Bug 450992 - SCSI disk online resize
SCSI disk online resize
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Rob Evers
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-12 01:14 EDT by Watanabe Takashi
Modified: 2013-03-19 14:33 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-19 14:33:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
online resize support for SCSI disk (676 bytes, patch)
2008-06-12 01:14 EDT, Watanabe Takashi
no flags Details | Diff

  None (edit)
Description Watanabe Takashi 2008-06-12 01:14:31 EDT
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.
Comment 1 Watanabe Takashi 2008-06-12 01:14:31 EDT
Created attachment 309029 [details]
online resize support for SCSI disk
Comment 2 Prarit Bhargava 2008-06-16 08:17:52 EDT
Kei, is this a feature request?

P.
Comment 3 Keiichiro Tokunaga 2008-06-16 16:41:13 EDT
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?
Comment 4 Watanabe Takashi 2008-06-16 21:10:51 EDT
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.
Comment 5 Watanabe Takashi 2008-06-17 01:08:15 EDT
Why is this entry restricted to Fujitsu Confidential Group??
Can I uncheck that checkbox?
Comment 6 RHEL Product and Program Management 2009-02-16 10:44:30 EST
Updating PM score.
Comment 8 Rob Evers 2013-02-27 13:29:22 EST
(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

Note You need to log in before you can comment on or make changes to this bug.