Description of problem: on resizeing open'd SCSI disk, new size information will not apply even if I rescan SCSI disk device. Version-Release number of selected component (if applicable): kernel-2.6.18-92.el5 How reproducible: always Steps to Reproduce: (iSCSI example) 1. (target) setup LVM + iSCSI target - pvcreate, vgcreate, lvcreate - (install scsi-target-utils package) - service tgtd start - tgtadm --lld iscsi --mode target --op new --tid 1 -T iqn.2008-06.xxx:test1 - tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/vg/lv - tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL 2. (initiator) attach the target volume, mkfs, mount - (install iscsi-initiator-utils) - service iscsi start - iscsiadm -m discovery -t st -p (target IP) - iscsiadm -m node -T iqn.2008-06.xxx:test1 -l - mkfs.ext3 /dev/sdX - mount /dev/sdX /mnt 3. (target) resize LVM device and apply change to target daemon - lvextend -L new-size /dev/vg/lv - tgtadm --lld iscsi --mode logicalunit --op delete --tid 1 --lun 1 - tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/vg/lv 4. (initiator) rescan device - echo 1 > /sys/block/sdX/device/rescan - cat /proc/partitions looks good. 5. (initiator) resize2fs /dev/sdX Actual results: # resize2fs /dev/sdb resize2fs 1.39 (29-May-2006) The filesystem is already 5242880 blocks long. Nothing to do! Expected results: # resize2fs /dev/sdb resize2fs 1.39 (29-May-2006) Filesystem at /dev/sdb is mounted on /mnt; on-line resizing required Performing an on-line resize of /dev/sdb to 10485760 (4k) blocks. The filesystem on /dev/sdb is now 10485760 blocks long. Additional info: device size information exists in device capacity and in-core inode when device opened/mounted. LVM changes both of them, but SCSI changes only device capacity. attached patch will fix this behaviour. Thanks.
Created attachment 309029 [details] online resize support for SCSI disk
Kei, is this a feature request? P.
Reading the title and descriptions, it sounds like a bug to me. (Feature requrests must have a prefix "FEAT" in the title.) Watanabe-san, can you tell us if it's a feature request or not?
OK, This is a feature request. some RAID box(like Eternus) have "online LUN expansion" feature and it may be supported(?) by indivisual driver. I think online-resize would better be supported by sd_mod or higher layer. Thank you.
Why is this entry restricted to Fujitsu Confidential Group?? Can I uncheck that checkbox?
Updating PM score.
(In reply to comment #0) > Description of problem: > on resizeing open'd SCSI disk, new size information will not apply even if I > rescan SCSI disk device. > > Version-Release number of selected component (if applicable): > kernel-2.6.18-92.el5 > > How reproducible: > always > > Steps to Reproduce: > (iSCSI example) > 1. (target) setup LVM + iSCSI target > - pvcreate, vgcreate, lvcreate > - (install scsi-target-utils package) > - service tgtd start > - tgtadm --lld iscsi --mode target --op new --tid 1 -T > iqn.2008-06.xxx:test1 > - tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b > /dev/vg/lv > - tgtadm --lld iscsi --mode target --op bind --tid 1 -I ALL > 2. (initiator) attach the target volume, mkfs, mount > - (install iscsi-initiator-utils) > - service iscsi start > - iscsiadm -m discovery -t st -p (target IP) > - iscsiadm -m node -T iqn.2008-06.xxx:test1 -l > - mkfs.ext3 /dev/sdX > - mount /dev/sdX /mnt > 3. (target) resize LVM device and apply change to target daemon > - lvextend -L new-size /dev/vg/lv > - tgtadm --lld iscsi --mode logicalunit --op delete --tid 1 --lun 1 > - tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b > /dev/vg/lv > 4. (initiator) rescan device > - echo 1 > /sys/block/sdX/device/rescan The iscsi subsystem may not update all the initiator host information. Please try: iscsiadm -m session -R > - cat /proc/partitions > looks good. > 5. (initiator) resize2fs /dev/sdX