iscsiadm assistance - Changing the size of iet based target
William Muriithi
william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Dec 14 22:05:30 UTC 2011
Afternoon pal
I am trying to extend the size of a logical volume and I have
encountered a problem where the the iscsi server do not seem to notice
the change of the logical volume and continue to advertise the old
logical volume size.
This is how I approached it:-
>From the initiator
1) Unmounted the device on the iscisi initiator
umount /dev/sde1
2) Disconnected the target from the initiator
iscsiadm --mode node --targetname
iqn.2010-01.com.example:server1.synstor2.fileshares.example-lun-9
--portal 10.2.3.75:3260 --logout
>From the target
1) Kill existing iscsi session from the initiator by first finding it
and the using parameters under proc to kill the session
cat /proc/net/iet/session
ietadm --op delete --tid=36 --sid=15762599018562048 --cid=0
2) Delete the advertised LUN from the RAM
ietadm --op delete --tid=36 --lun=55
3) Delete the target ID from RAM
ietadm --op delete --tid=36 (Fails by the way, saying the "device is busy"
4) Extend the logical volume
lvextend -L90G /dev/FileShares/Testing (This is supposed to change
the volume from 80 GB to 90 GB)
When I type lvdisplay, I can see that the lvextend has run successfully
5) Create the target ID again
ietadm --op new --tid=2 --lun=1 --params Path=/dev/vg01/vol1,Type=blockio
6) Then, on the initiator side, I connect back to the target
iscsiadm --mode node --targetname
iqn.2010-01.com.example:server1.synstor2.fileshares.example-lun-9
--portal 10.2.3.75:3260 --login
7) Mount the devices
mount -av
8) Extend the file system
xfs_growfs /media/store/example
However, the filesize do not change, and this look like its because
the iscsi target still advertise the LUN as 80 GB instead of 90 GB.
Any one know of a way of making iet notice the change short of
restarting the target? I am not able to do that as there is a lot of
initiators using this target and would all be affected
Regards,
William
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list