Skip to contentSkip to conversation

scsi lun online resize

DISCUSSION Dmitry Melekhov 2 participants 4 messages Jun 5, 2007 – Jul 9, 2007

lore
Share & tools
lore
#0 lore raw

Hello!

I'm playing with iscsi on linux.
And I have following problem:

If I change lun size on target side and then do echo "1" >/sys/block/ sdb/device/rescan
device size is changed only if /dev/sdb is not mounted, if it is mounted fdisk shows no size change, so lun can't be resized online.

open-iscsi guys say this is general linux problem, not iscsi specific. Could you tell me is there any solution?

Thank you!

#1 lore raw
Quoted 5 lines · Dmitry Melekhov

Hello!

I'm playing with iscsi on linux.
And I have following problem:

Quoted 8 lines

If I change lun size on target side and then do echo "1" >/sys/block/ sdb/device/rescan
device size is changed only if /dev/sdb is not mounted, if it is mounted fdisk shows no size change, so lun can't be resized online.

open-iscsi guys say this is general linux problem, not iscsi specific. Could you tell me is there any solution?

Do you have partition table on /dev/sdb, or are you using /dev/sdb directly?

-- Pasi

#2 lore raw
Quoted 12 lines · Pasi Kärkkäinen
Quoted 10 lines · Dmitry Melekhov

Hello!

I'm playing with iscsi on linux.
And I have following problem:

If I change lun size on target side and then do echo "1" >/sys/block/ sdb/device/rescan
device size is changed only if /dev/sdb is not mounted, if it is mounted fdisk shows no size change, so lun can't be resized online.

Quoted 9 lines
Quoted 4 lines

open-iscsi guys say this is general linux problem, not iscsi specific. Could you tell me is there any solution?

Do you have partition table on /dev/sdb, or are you using /dev/sdb directly?

I tried both...

#3 lore raw
Quoted 18 lines · Dmitry Melekhov
Quoted 17 lines · Pasi Kärkkäinen
Quoted 14 lines · Dmitry Melekhov

Hello!

I'm playing with iscsi on linux.
And I have following problem:

If I change lun size on target side and then do echo "1" >/sys/block/ sdb/device/rescan
device size is changed only if /dev/sdb is not mounted, if it is mounted fdisk shows no size change, so lun can't be resized online.

open-iscsi guys say this is general linux problem, not iscsi specific. Could you tell me is there any solution?

Quoted 6 lines
Quoted 4 lines

Do you have partition table on /dev/sdb, or are you using /dev/sdb directly?

I tried both...

Did you try:

echo "- - -" > /sys/class/scsi_host/hostX/scan

That works at least with Qlogic iSCSI HBA (qla4xxx).

-- Pasi