On Wed, Feb 25, 2009 at 08:14:47AM +0100, Ulrich Windl wrote:
> 
> Hi,
> 
> I have a related question: Some of the modern SAN disk systems allow a LUN 
> resize. 
> Does open-iscsi support "resized disks" in any way? I mean: Will the kernel 
> detect 
> that the disk has a new size?

That depends on the iSCSI targets. Some send an SCSI Asynchronous Event and the
iscsi daemon asks the kernel to execute READ CAPACITY which then can then find
the new size and register it. So once you re-sized the disk, your 
iscsi-initiator
would automatically get notified (within seconds) and your disk would show 
bigger
disk size.

If the iSCSI target does not send that (AEN), it is up to you to initiate this. 
You can
do either 'iscsiadm -node -R' or 'echo 1 > /sys/block/sdX/device/rescan'. One 
way
to figure out if the kernel is out of sync with the real world is do:

SysFS_size=`cat /sys/block/sda/size`
SG_size=`sg_readcap /dev/sda | grep Number |sed s'/.*blocks=//'`

if [ $SysFS_size != $SG_size ]; then
        echo 1 > /sys/block/sda/device/rescan
fi

Keep in mind that if you have multipath stacked on top of your block device
you also need to tell multipath that your device has grown. This can be done
by doing:

multipathd -k'resize <wwid>'

(Thought only RHEL5 and SLES11 have this support).

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to