[CentOS] Rescan harddisk size without rebooting

Thu Nov 10 02:14:56 UTC 2005
Bryan J. Smith <thebs413 at earthlink.net>

kadafax <kadafax at gmail.com> wrote:
> (I found that the module used was qla6320, dont know if
> there is an issue with this but I thought that the qla2200
> would be more appropriate since the host card is a qla200.)

There's many variants in the QLogic 200 series.  I just
listed the common denominator that most people have.  I
figured if you were messing with SAN solutions, you might
know the exact variant/driver you were already running. 
Sorry about that.  I probably should have told you to run
"lsmod" to verify first.

Okay, next time I'll make that big, long, step-by-step
verbose post that makes the seasoned guys around here cringe
(just stick up for me if anyone complains ;-).

> how to release device assignments? I didn't find any clue
> on google.

You have to go into the /proc filesystem.  Location may
differ between kernel 2.4 and 2.6.

> nope CentOS 4.2

Hmmm, interesting.  I guess when we loaded the qla2200
module, it went after the same path as another module already
loaded(?).  I guess I'd have to see the output of your
"lsmod" and look around the /proc filesystem.

Eck.  It's stuff like this that I just need to be in front of
the system, or I could be making things worse for you (and
probably already am ;-).

> ( come on :) )
> Will this take off-line the physical extents along with the
> VG? :
> ---
> [root at X ~]# vgchange -a n /dev/VG-B/LV-B
> ---

I'd rather not say either way without being right at your
setup.  There are just so many factors.  E.g., the fact that
your main /dev/sda is live (is it also a SAN connection?). 
I'd really rather not tell you to do anything else at this
point.

> after the 'vgchange -a n', 'rmmod & modprobe' then the
> 'vgchange -a y':
> ---
> [root at X ~]#  vgscan
>   Reading all physical volumes.  This may take a while...
>   Found volume group "VG-C" using metadata type lvm2
>   Found volume group "VG-B" using metadata type lvm2
>   Found volume group "VolGroup00" using metadata type lvm2
> ---

Looks good.  I'm just curious what we do about the SCSI
mapping though -- let alone the fact that we loaded that
other module.

> but the /dev/sdb and sdc are gone, the PV have just
> followed the shift of the device assignments and the new
> available physical extents are not there.

Hmmm, what does the raw "fdisk -l /dev/sdd" and "fdisk -l
/dev/sde" commands give you?  Do you see the extra space (you
should)?

I'm just trying to think how you expand the PVs (slice type
8Eh, I assume?) to the actual size of the partitions.

> After putting off-line the VG (vgchange -a n)
> unloading then loading the qla module, the new correct
> size is shown by fdisk but not with LVM (no new physical
> extents appeared). How to gain the new extents 
> within LVM when the HD growed up?

Okay, so you ran "fdisk -l" and see it -- good.

You probably need to add another slice (partition) to the
devices then.  Type it as LVM (8Eh), then add that as another
PV.

> (It's late here in europe, I will be back tomorrow. Thanks
> again for support).

I'll be here (up all night for the next 2 nights, long
story).



-- 
Bryan J. Smith                | Sent from Yahoo Mail
mailto:b.j.smith at ieee.org     |  (please excuse any
http://thebs413.blogspot.com/ |   missing headers)