Rescan harddisk size without rebooting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Bryan J. Smith wrote:

>kadafax <kadafax@xxxxxxxxx> wrote:
>  
>
>>Thanks for reply Bryan,
>>in fact since the mounted FS is for backup purpose only,
>>it's not a big deal to un-mount it (far better than
>>disabling the ldap service with a reboot). I've checked
>>google and the result it gives seems to be too 
>>heavy for this production server (new scsi driver etc.). So
>>if you have a solution who is working on un-mounted volume,
>>I'm very interrested.
>>PS: The SAN is an AX100sc from EMC. The host adapter is a
>>QLA200 from QLogic. OS: CentOS 4.2
>>    
>>
>
>If all volumes are unmounted, then you can simply remove the
>driver and modprobe it again.
>
>E.g.,
>  # /sbin/rmmod qla2200
>  # /sbin/modprobe qla2200
>
>I'm assuming your /etc/modprobe.conf file has all options
>(SAN paths, etc...) for the card defined.
>
>Once that is done, your /dev/sdb device should be updated to
>reflect the new geometry of the storage.  Just add the new
>space as a new, physical volume, add it to your existing
>volume group, etc...
>  
>
Quite there: the new size is reflected...but the disks (I've got two 
virtual disks from the SAN, who are seen like scsi disk by the system) 
are now described as /dev/sdd and /dev/sde (initialy /dev/sdb and sdc) 
(below output from a "fdisk -l", the disc which grew is initialy sdb). 
And a "pvdisplay" do not see any new physical extents available (perhaps 
I'm missing something on this, I'm totally new from this and way long to 
be totally cool with it):
---

* before the rmmod/modprobe (see /dev/sdb):
---
[root@X install]# fdisk -l

Disk /dev/sda: 146.6 GB, 146695782400 bytes
255 heads, 63 sectors/track, 17834 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       17834   143147182+  8e  Linux LVM

Disk /dev/sdb: 700.0 GB, 700079669248 bytes
255 heads, 63 sectors/track, 85113 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 233.0 GB, 233001975808 bytes
255 heads, 63 sectors/track, 28327 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table
---

After:

---
[root@X install]# fdisk -l

Disk /dev/sda: 146.6 GB, 146695782400 bytes
255 heads, 63 sectors/track, 17834 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       17834   143147182+  8e  Linux LVM

Disk /dev/sdd: 933.0 GB, 933081645056 bytes
255 heads, 63 sectors/track, 113440 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 233.0 GB, 233001975808 bytes
255 heads, 63 sectors/track, 28327 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table
---
Should I be worried about the "non-valid partition" table message? I can 
use the LV (mount and work with files), so I don't know if it is a 
problem. Maybe the fact that there is no partition table for fdisk is 
why I can't make it grow? I mean, maybe I should have create first one 
partition (type LVM), then create a second one with the extra size ?
Here is what I've done to create the logical volume:
---
[root@X ~]# pvcreate /dev/sdb
[root@X ~]# vgcreate VG-B /dev/sdb
[root@X ~]# lvcreate -l 166911 VG-B -n LV-B
// Note: 166911 is the maximum number of physical extents available 
before the grow
[root@X ~]# mkfs.ext3 /dev/VG-B/LV-B
---
from there I could use the volume.

---

[root@onyx install]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sde
  VG Name               VG-C
  PV Size               217.00 GB / not usable 0  
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              55551
  Free PE               0
  Allocated PE          55551
  PV UUID               w3Q4hA-ALnz-4UuH-fdBB-FGOT-Rn2t-4iG2Vv
  
  --- Physical volume ---
  PV Name               /dev/sdd
  VG Name               VG-B
  PV Size               652.00 GB / not usable 0  
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              166911
  Free PE               0
  Allocated PE          166911
  PV UUID               AFcoa6-6eJl-AAd3-G0Vt-OTXR-niPn-3bTLXu
  
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               136.50 GB / not usable 0  
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              4368
  Free PE               1
  Allocated PE          4367
  PV UUID               OjQEXi-u3F8-wCXO-1eZY-W2j0-iZyG-5PwwnB
----


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.centos.org/pipermail/centos/attachments/20051109/721ee71e/attachment.htm

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux