Unnest a LVM volume exported with IET

View: New views
8 Messages — Rating Filter:   Alert me  

Unnest a LVM volume exported with IET

by Padmanabhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,
I have a small test setup, where I am exporting Logical volume as IET disk. Initiator recognised this disk,formatted with ext3 and everything is working fine.
I came across this link and I tried to follow the instructions

http://iscsitarget.sourceforge.net/wiki/index.php/SelfMountingExportedVolumes

But output for fdisk -lu /dev/sdc does not give start and end blocks.

"" It says /dev/sdc does not have valid partition table ""

Do I need to unnest it ? If yes, how should I proceed from here.

Thanks for your time and help

Regards
Padmanabhan

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Parent Message unknown Re: Unnest a LVM volume exported with IET

by rswwalker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Iscsitarget-devel] Unnest a LVM volume exported with IET

First, never mount the backing store while IET has it open or you will find your data will be inconsistent.

The easiest way to do this is to use 'kpartx' to find the nested partition in the LV and have it create dev-mapper regions for it.

# kpartx -a /dev/<vgname>/<lvname>

You will find partitions in /dev/mapper/ like <lvname>a ... And so on.

Just mount the /dev/mapper/ partition and you should be good.

If you created a lvm vg out of the storage on the initiator you cannot just mount it, you need to do a vg import and then mount the respective lvs.

-Ross



----- Original Message -----
From: iscsitarget-devel-bounces@... <iscsitarget-devel-bounces@...>
To: iscsitarget-devel@... <iscsitarget-devel@...>
Sent: Wed Jun 18 23:35:37 2008
Subject: [Iscsitarget-devel] Unnest a LVM volume exported with IET

Hello all,
I have a small test setup, where I am exporting Logical volume as IET disk. Initiator recognised this disk,formatted with ext3 and everything is working fine.
I came across this link and I tried to follow the instructions

http://iscsitarget.sourceforge.net/wiki/index.php/SelfMountingExportedVolumes

But output for fdisk -lu /dev/sdc does not give start and end blocks.

"" It says /dev/sdc does not have valid partition table ""

Do I need to unnest it ? If yes, how should I proceed from here.

Thanks for your time and help

Regards
Padmanabhan


This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by Padmanabhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
Current setup

On the Target system, I have created logical volume from VG00 and named as /dev/VolGroup00/target1. My IETD conf file config looks like
Target1
Lun 1 Path=/dev/VolGroup00/target1,Type=blockio

On the initiator side, it comes as block device /dev/sdX, formatted with ext3 filesystem and mounting it as
mount /dev/sdX    /mnt/iscsi
=============
It works fine but when I came across the link mentioned in my previous email, i am confused.

Is this nested storage? I tired steps mentioned in last email on the target PC

# kpartx -a /dev/VolGroup00/target1   -- accepted the cmd
and in /dev/mapper, the file is-- VolGroup00-target1

Please suggest me whether I am doing it in a correct manner or not.

Thanks


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by rswwalker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Padmanabhan wrote:

> Hello,
> Current setup
>
> On the Target system, I have created logical volume from VG00
> and named as /dev/VolGroup00/target1. My IETD conf file
> config looks like
> Target1
> Lun 1 Path=/dev/VolGroup00/target1,Type=blockio
>
> On the initiator side, it comes as block device /dev/sdX,
> formatted with ext3 filesystem and mounting it as
> mount /dev/sdX    /mnt/iscsi
> =============
> It works fine but when I came across the link mentioned in my
> previous email, i am confused.
>
> Is this nested storage? I tired steps mentioned in last email
> on the target PC
>
> # kpartx -a /dev/VolGroup00/target1   -- accepted the cmd
> and in /dev/mapper, the file is-- VolGroup00-target1
>
> Please suggest me whether I am doing it in a correct manner or not.

Well if you just formatted /dev/sdX and didn't fdisk it to create
a MBR partition table then it could be just a raw disk file system
in which case you can just mount the logical volume on the target
side like any other.

If there is a MBR partition table there then kpartx will read it
and create partition slices for the logical volume such as:

/dev/mapper/VolGroup00-target1a
/dev/mapper/VolGroup00-target1b
.
.
.

You can then mount any of these slices as a regular partition
on the target side.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by dlambert_bmt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

No, that’s not a nested volume. You should be able to mount it with

 

mkdir /mnt/target1
mount /dev/VolGroup00/target1 /mnt/target1

 

(when IET is not running). If you were actually mounting /dev/sdX1 on the initiator, then it would be nested storage.

 

--

David Lee Lambert

Software Developer, Precision Motor Transport Group, LLC

517-349-3011 x223 (work) … 586-873-8813 (cell)


From: iscsitarget-devel-bounces@... [mailto:iscsitarget-devel-bounces@...] On Behalf Of Padmanabhan
Sent: Thursday, June 19, 2008 10:15 PM
To: Ross S. W. Walker
Cc: iscsitarget-devel@...
Subject: Re: [Iscsitarget-devel] Unnest a LVM volume exported with IET

 

Hello,
Current setup

On the Target system, I have created logical volume from VG00 and named as /dev/VolGroup00/target1. My IETD conf file config looks like
Target1
Lun 1 Path=/dev/VolGroup00/target1,Type=blockio

On the initiator side, it comes as block device /dev/sdX, formatted with ext3 filesystem and mounting it as
mount /dev/sdX    /mnt/iscsi
=============
It works fine but when I came across the link mentioned in my previous email, i am confused.

Is this nested storage? I tired steps mentioned in last email on the target PC

# kpartx -a /dev/VolGroup00/target1   -- accepted the cmd
and in /dev/mapper, the file is-- VolGroup00-target1

Please suggest me whether I am doing it in a correct manner or not.

Thanks


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by Padmanabhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks,, this what I did ( at initiator side ) after initiator logged into target

1. Initiator found it as new block device /dev/sdb

2. sudo mkfs.ext3 /dev/sdb
mke2fs 1.40.2 (12-Jul-2007)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
643840 inodes, 1286144 blocks
64307 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1317011456
40 block groups
32768 blocks per group, 32768 fragments per group
16096 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

3. mkdir /mnt/iscsi
4. mount /dev/sdb  /mnt/iscsi

As said earlier, the /dev/sdb which I formatted on the initiator side, is actually a Logical Volume on the target system.
Is this is a nested ?

I am in the process learning storage networking ... thanks for sharing your expertise

 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by rswwalker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Padmanabhan wrote:

> /dev/sdb is entire device, not just one partition!
> Proceed anyway? (y,n) y

<snip>

> As said earlier, the /dev/sdb which I formatted on the
> initiator side, is actually a Logical Volume on the target system.
> Is this is a nested ?

It's not nested, as can be determined from above. You created the
file system on the whole disk and not a partition within it, so
there is no nested partitions to worry about. You can just mount
the LV on the target system like any other LV.

> I am in the process learning storage networking ... thanks
> for sharing your expertise

Not a problem, just pay it forward and return the favor by
helping the next newcomer (not necessarily on this list
and not necessarily concerning storage networking).

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel

Re: Unnest a LVM volume exported with IET

by Padmanabhan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not a problem, just pay it forward and return the favor by
helping the next newcomer (not necessarily on this list
and not necessarily concerning storage networking).

Thanks Ross,,, will do ..always

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Iscsitarget-devel mailing list
Iscsitarget-devel@...
https://lists.sourceforge.net/lists/listinfo/iscsitarget-devel