[stgt] how can I online resize lun with tgtadm?

Jelle de Jong jelledejong at powercraft.nl
Wed Aug 24 17:03:51 CEST 2011

On 08/23/11 19:30, FUJITA Tomonori wrote:
> We could implement the feature via tgtadm. But I would prefer that
> tgtd could automatically detect the resize. The following patch works
> if you use files for logical units. But I'm not sure the patch works
> with LVM. Can anyone test the patch with LVM?

I can not try the patch, but maybe you can try LVM with the file?

dd count=102400 bs=1024 if=/dev/zero of=temp

parted --script temp \
mklabel msdos \
mkpart primary 8M 100% \
toggle 1 boot \

losetup /dev/loop0 temp

fdisk -ul /dev/loop0

pvcreate /dev/loop0
vgcreate lvm0-vol /dev/loop0


lvcreate --name storage --size 32M lvm0-vol

then use the storage device with tgtadm....

lvextend --size +32M /dev/lvm0-vol/storage

grow the logical volume..

see what happens with the tgtadm

Thanks in advance,

Kind regards,

Jelle de Jong

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20110824/04a66424/attachment-0001.sig>

More information about the stgt mailing list