[CentOS] Rescan harddisk size without rebooting

Bryan J. Smith thebs413 at earthlink.net
Wed Nov 9 11:10:59 UTC 2005

On Wed, 2005-11-09 at 11:52 +0100, kadafax wrote:
> Hi list,
> I have a SAN attached to a CentOS 4.2 server. I have expanded the size 
> of the virtual disk within the SAN (by adding a new HD to the disk pool) 
> and need CentOS to see the new size (CentOS see it as /dev/sdb). I'm 
> using LVM. Do you  know a method for the Volume Group to see that one of 
> its harddisk is now bigger, without rebooting (it's not a problem with a 
> reboot but since the LDAP directory is on this server, it is problematic).
> Thanks.

Anytime you expand what Linux sees as a "physical device" -- even though
it's a volume over a FC HBA -- that is not always easy to address.  You
typically have to rescan the SCSI bus (which is what the FC HBA presents
the storage as).  Unfortunately, if you have filesystems mounted on that
device, they may not update -- even if you're using LVM atop.

Last time I checked, there was no single command to rescan the SCSI bus
in RHEL.  Ironically enough, I typically just do a Google search for
"Linux SCSI bus scan" and run the few commands listed whenever I need to
do so.  But I don't know what that might do to your running storage --
it could kill your mounts.

Bryan J. Smith     b.j.smith at ieee.org     http://thebs413.blogspot.com
The best things in life are NOT free - which is why life is easiest if
you save all the bills until you can share them with the perfect woman

More information about the CentOS mailing list