All of lore.kernel.org
 help / color / mirror / Atom feed
* online disk resizing
@ 2007-07-04 17:16 Alexander Benaguev
  2007-07-05  7:31 ` Roland Mieslinger
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Benaguev @ 2007-07-04 17:16 UTC (permalink / raw)
  To: dm-devel

hi, list

I have fc-based SAN which has ability to resizing logical disks online (IBM DS4000). is this a 
method tell about resizing to host system (centOS 5) without reboot or echo "scsi 
remove(add)-single-device 0 1 2 3"? I use multipath if this matters. will apprecate any help

alexander

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: online disk resizing
  2007-07-04 17:16 online disk resizing Alexander Benaguev
@ 2007-07-05  7:31 ` Roland Mieslinger
  2007-07-05  7:33   ` Hannes Reinecke
  0 siblings, 1 reply; 12+ messages in thread
From: Roland Mieslinger @ 2007-07-05  7:31 UTC (permalink / raw)
  To: device-mapper development

I did the same with HP MSA in the past, but without dm involved.

You can use "blockdev --rereadpt <blockdevice>" to make the the kernel
recognise the new disk size (geometery). The nasty thing is that you
have to stop all I/O to the blocdevice. 

Roland Mieslinger

> -----Original Message-----
> From: dm-devel-bounces@redhat.com 
> [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
> Sent: Mittwoch, 4. Juli 2007 19:17
> To: dm-devel@redhat.com
> Subject: [dm-devel] online disk resizing
> 
> hi, list
> 
> I have fc-based SAN which has ability to resizing logical 
> disks online (IBM DS4000). is this a method tell about 
> resizing to host system (centOS 5) without reboot or echo 
> "scsi remove(add)-single-device 0 1 2 3"? I use multipath if 
> this matters. will apprecate any help
> 
> alexander
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05  7:31 ` Roland Mieslinger
@ 2007-07-05  7:33   ` Hannes Reinecke
  0 siblings, 0 replies; 12+ messages in thread
From: Hannes Reinecke @ 2007-07-05  7:33 UTC (permalink / raw)
  To: device-mapper development

Roland Mieslinger wrote:
> I did the same with HP MSA in the past, but without dm involved.
> 
> You can use "blockdev --rereadpt <blockdevice>" to make the the kernel
> recognise the new disk size (geometery). The nasty thing is that you
> have to stop all I/O to the blocdevice. 
> 
You've not only to stop all I/O, but also have to make sure that on-one
claims the device (ie no open files, not mounted, no device-mapper tables
etc.). Otherwise will the kernel reject any size updates.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05  9:54 Raayman, Sebastian
@ 2007-07-05 12:43 ` Alexander Benaguev
  2007-07-05 12:56   ` Kevin Foote
  2007-07-05 13:15   ` Roland Mieslinger
  0 siblings, 2 replies; 12+ messages in thread
From: Alexander Benaguev @ 2007-07-05 12:43 UTC (permalink / raw)
  To: device-mapper development

Raayman, Sebastian wrote:
> this is also dependant on the HBA you are using. With a Qlogic adapter
> you can simply send an:
> 
> echo scsi-qlascan 
> 
> to your Qlogic adapter (for example under /proc/scsqi/qla2xxx)

thanks for attention, guys

Sebastian, yes, I use qlogic, but, you will laught, I have not /proc/scsqi/qla2xxx. googling around 
shows that:
"as of RHEL4 U3 (and I'd imagine upstream kernel.org kernels) the 'scsi-qlascan' no longer works 
with the qla2xxx driver. The new method is:

echo 1 > /sys/class/fc_host/host<ID>/issue_lip
echo "- - -" > /sys/class/scsi_host/host<ID>/scan" but it does not work for me.
I tried "echo 1 > 
/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/0000:06:01.0/host1/rport-1:0-1/target1:0:1/1:0:1:2/rescan" 
too. so, it was much better: dmesg showed me disks with new capacity, but "fdisk -l" still showing 
old capacity;( any thoughts?

alexander

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05 12:43 ` Alexander Benaguev
@ 2007-07-05 12:56   ` Kevin Foote
  2007-07-05 13:15   ` Roland Mieslinger
  1 sibling, 0 replies; 12+ messages in thread
From: Kevin Foote @ 2007-07-05 12:56 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 2127 bytes --]

Alexander
Here is what I do (RHEL4u4) I use iscsi over a qlogic HBA but its basically
the same.. still "scsi" to RH :-)
Oh yea no partitions on my volumes either, It seems cleaner that way.

1. stop access to volume and unmount
2. resize your san volume
3. locate the scsi target number
    > cat /proc/scsi/qla4xxx/<controller>
   I find the volume Im interested in via our naming schema .. your milage
my very with that.
   I now have my volume def in scsi terms .. ie 2 0 2 0 or <host> <channel>
<scsi id> <lun>
4. remove and readd the scsi device
   > echo "scsi remove-single-device 2 0 2 0" > /proc/scsi/scsi
   > echo "scsi add-single-device 2 0 2 0" > /proc/scsi/scsi
6. at this point I have a new scsi device ie /dev/sdg or such which should
reflect the new size via your dmesg
   ( i usually have a tail -f of /var/log/messages going :-)
7. next run my ext2online to get the FS in sync with the actual size of the
volume
8. remount and re access the volume

Hope that helps out some ..

-- 
:wq!
kevin.foote

On 7/5/07, Alexander Benaguev <zul@sigmatrans.ru> wrote:
>
> Raayman, Sebastian wrote:
> > this is also dependant on the HBA you are using. With a Qlogic adapter
> > you can simply send an:
> >
> > echo scsi-qlascan
> >
> > to your Qlogic adapter (for example under /proc/scsqi/qla2xxx)
>
> thanks for attention, guys
>
> Sebastian, yes, I use qlogic, but, you will laught, I have not
> /proc/scsqi/qla2xxx. googling around
> shows that:
> "as of RHEL4 U3 (and I'd imagine upstream kernel.org kernels) the
> 'scsi-qlascan' no longer works
> with the qla2xxx driver. The new method is:
>
> echo 1 > /sys/class/fc_host/host<ID>/issue_lip
> echo "- - -" > /sys/class/scsi_host/host<ID>/scan" but it does not work
> for me.
> I tried "echo 1 >
> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/0000:06:01.0
> /host1/rport-1:0-1/target1:0:1/1:0:1:2/rescan"
> too. so, it was much better: dmesg showed me disks with new capacity, but
> "fdisk -l" still showing
> old capacity;( any thoughts?
>
> alexander
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2888 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: online disk resizing
  2007-07-05 12:43 ` Alexander Benaguev
  2007-07-05 12:56   ` Kevin Foote
@ 2007-07-05 13:15   ` Roland Mieslinger
  2007-07-05 14:08     ` Alexander Benaguev
  1 sibling, 1 reply; 12+ messages in thread
From: Roland Mieslinger @ 2007-07-05 13:15 UTC (permalink / raw)
  To: device-mapper development

> -----Original Message-----
> From: dm-devel-bounces@redhat.com 
> [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
> Sent: Donnerstag, 5. Juli 2007 14:44
> To: device-mapper development
> Subject: Re: [dm-devel] online disk resizing
> 
> Raayman, Sebastian wrote:
> > this is also dependant on the HBA you are using. With a 
> Qlogic adapter 
> > you can simply send an:
> > 
> > echo scsi-qlascan
> > 
> > to your Qlogic adapter (for example under /proc/scsqi/qla2xxx)
> 
> thanks for attention, guys
> 
> Sebastian, yes, I use qlogic, but, you will laught, I have 
> not /proc/scsqi/qla2xxx. googling around shows that:
> "as of RHEL4 U3 (and I'd imagine upstream kernel.org kernels) 
> the 'scsi-qlascan' no longer works with the qla2xxx driver. 
> The new method is:
> 
> echo 1 > /sys/class/fc_host/host<ID>/issue_lip
> echo "- - -" > /sys/class/scsi_host/host<ID>/scan" but it 
> does not work for me.
> I tried "echo 1 >
> /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/0000:06:01.0
> /host1/rport-1:0-1/target1:0:1/1:0:1:2/rescan" 
> too. so, it was much better: dmesg showed me disks with new 
> capacity, but "fdisk -l" still showing old capacity;( any thoughts?

try: 
blockdevice --rereadpt <blockdevice>

Roland

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05 13:15   ` Roland Mieslinger
@ 2007-07-05 14:08     ` Alexander Benaguev
  2007-07-05 14:15       ` Roland Mieslinger
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Benaguev @ 2007-07-05 14:08 UTC (permalink / raw)
  To: device-mapper development

Roland Mieslinger wrote:
> try: 
> blockdevice --rereadpt <blockdevice>
> 
> Roland
just tried. no effect;(

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: online disk resizing
  2007-07-05 14:08     ` Alexander Benaguev
@ 2007-07-05 14:15       ` Roland Mieslinger
  2007-07-05 14:19         ` Alexander Benaguev
  0 siblings, 1 reply; 12+ messages in thread
From: Roland Mieslinger @ 2007-07-05 14:15 UTC (permalink / raw)
  To: device-mapper development

> -----Original Message-----
> From: dm-devel-bounces@redhat.com 
> [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
> Sent: Donnerstag, 5. Juli 2007 16:08
> To: device-mapper development
> Subject: Re: [dm-devel] online disk resizing
> 
> Roland Mieslinger wrote:
> > try: 
> > blockdevice --rereadpt <blockdevice>
> > 
> > Roland
> just tried. no effect;(

Did you get a error from blockdev command?
Did you stop all I/O to the device? 

This command worked for me in the past several times. 

Roland

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05 14:15       ` Roland Mieslinger
@ 2007-07-05 14:19         ` Alexander Benaguev
  2007-07-05 14:22           ` Roland Mieslinger
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Benaguev @ 2007-07-05 14:19 UTC (permalink / raw)
  To: device-mapper development

Roland Mieslinger wrote:
> Did you get a error from blockdev command?
none
> Did you stop all I/O to the device? 
I can't!=) it's not online resizing, if I should stoping io;(

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: online disk resizing
  2007-07-05 14:19         ` Alexander Benaguev
@ 2007-07-05 14:22           ` Roland Mieslinger
  2007-07-05 14:26             ` Kevin Foote
  2007-07-06  6:19             ` Hannes Reinecke
  0 siblings, 2 replies; 12+ messages in thread
From: Roland Mieslinger @ 2007-07-05 14:22 UTC (permalink / raw)
  To: device-mapper development

> -----Original Message-----
> From: dm-devel-bounces@redhat.com 
> [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
> Sent: Donnerstag, 5. Juli 2007 16:20
> To: device-mapper development
> Subject: Re: [dm-devel] online disk resizing
> 
> Roland Mieslinger wrote:
> > Did you get a error from blockdev command?
> none
> > Did you stop all I/O to the device? 
> I can't!=) it's not online resizing, if I should stoping io;(

That's were i stuck too. 
You can do it without reboot, but I've found no way to do it online.

Roland

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05 14:22           ` Roland Mieslinger
@ 2007-07-05 14:26             ` Kevin Foote
  2007-07-06  6:19             ` Hannes Reinecke
  1 sibling, 0 replies; 12+ messages in thread
From: Kevin Foote @ 2007-07-05 14:26 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 983 bytes --]

Yes same here.. with IO still going dm does the failover just fine (using
the echo scsi "remove/add") but failing back with a larger size is where I
have seene issues. Although we have never lost data :-)

-- 
:wq!
kevin.foote


On 7/5/07, Roland Mieslinger <roland.mieslinger@interoute.com> wrote:
>
> > -----Original Message-----
> > From: dm-devel-bounces@redhat.com
> > [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
> > Sent: Donnerstag, 5. Juli 2007 16:20
> > To: device-mapper development
> > Subject: Re: [dm-devel] online disk resizing
> >
> > Roland Mieslinger wrote:
> > > Did you get a error from blockdev command?
> > none
> > > Did you stop all I/O to the device?
> > I can't!=) it's not online resizing, if I should stoping io;(
>
> That's were i stuck too.
> You can do it without reboot, but I've found no way to do it online.
>
> Roland
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>

[-- Attachment #1.2: Type: text/html, Size: 1611 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: online disk resizing
  2007-07-05 14:22           ` Roland Mieslinger
  2007-07-05 14:26             ` Kevin Foote
@ 2007-07-06  6:19             ` Hannes Reinecke
  1 sibling, 0 replies; 12+ messages in thread
From: Hannes Reinecke @ 2007-07-06  6:19 UTC (permalink / raw)
  To: device-mapper development

Roland Mieslinger wrote:
>> -----Original Message-----
>> From: dm-devel-bounces@redhat.com 
>> [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alexander Benaguev
>> Sent: Donnerstag, 5. Juli 2007 16:20
>> To: device-mapper development
>> Subject: Re: [dm-devel] online disk resizing
>>
>> Roland Mieslinger wrote:
>>> Did you get a error from blockdev command?
>> none
>>> Did you stop all I/O to the device? 
>> I can't!=) it's not online resizing, if I should stoping io;(
> 
> That's were i stuck too. 
> You can do it without reboot, but I've found no way to do it online.
> 
As already said: online resizing only works if there are _no_ references
to that device. Ie no device-mapper tables referencing it etc.
Otherwise any block device updates will be rejected by the kernel.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-07-06  6:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-04 17:16 online disk resizing Alexander Benaguev
2007-07-05  7:31 ` Roland Mieslinger
2007-07-05  7:33   ` Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2007-07-05  9:54 Raayman, Sebastian
2007-07-05 12:43 ` Alexander Benaguev
2007-07-05 12:56   ` Kevin Foote
2007-07-05 13:15   ` Roland Mieslinger
2007-07-05 14:08     ` Alexander Benaguev
2007-07-05 14:15       ` Roland Mieslinger
2007-07-05 14:19         ` Alexander Benaguev
2007-07-05 14:22           ` Roland Mieslinger
2007-07-05 14:26             ` Kevin Foote
2007-07-06  6:19             ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.