Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 450992 - SCSI disk online resize
Summary: SCSI disk online resize
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Rob Evers
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-12 05:14 UTC by Watanabe Takashi
Modified: 2013-03-19 18:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-19 18:33:45 UTC
Target Upstream Version:


Attachments (Terms of Use)
online resize support for SCSI disk (deleted)
2008-06-12 05:14 UTC, Watanabe Takashi
no flags Details | Diff

Description Watanabe Takashi 2008-06-12 05:14:31 UTC
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 05:14:31 UTC
Created attachment 309029 [details]
online resize support for SCSI disk

Comment 2 Prarit Bhargava 2008-06-16 12:17:52 UTC
Kei, is this a feature request?

P.

Comment 3 Keiichiro Tokunaga 2008-06-16 20:41:13 UTC
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-17 01:10:51 UTC
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 05:08:15 UTC
Why is this entry restricted to Fujitsu Confidential Group??
Can I uncheck that checkbox?

Comment 6 RHEL Product and Program Management 2009-02-16 15:44:30 UTC
Updating PM score.

Comment 8 Rob Evers 2013-02-27 18:29:22 UTC
(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.