Adding new disks, include in volume group
paul at city-fan.org
Mon Jun 13 15:33:46 UTC 2005
Scot L. Harris wrote:
> On Mon, 2005-06-13 at 11:23, Gary Stainburn wrote:
>>I've got a FC3 system with default disk format as shown below. Is it
>>possible to add 2 more drives to the system so that the root filesystem
>>grows to use them?
>>If so, how would I go about this?
>>[root at lcomp4 home]# df
>>Filesystem 1K-blocks Used Available Use% Mounted on
>> 38833624 26761032 10099960 73% /
>>/dev/hda1 101086 8946 86921 10% /boot
>>none 128068 0 128068 0% /dev/shm
> Looks like root is in a LVM group so yes you should be able to add new
> disks and grow the root file system. The tricky part is that you will
> most likely have to do this from a rescue CD, not sure you can grow a
> file system that is mounted and being used. Hopefully someone that has
> done this will comment.
You can use ext2online to resize a mounted ext2/ext3 filesystem, so a
rescue CD might not be needed (ext2online can't always resize a
partition but it'll tell you if it can't).
The procedure basically involves using pvcreate to create LVM physical
volumes on the new disks, vgextend to add those physical volumes to
VolGroup00 and then lvextend to make logical volume
/dev/VolGroup00/LogVol00 bigger. You can then resize the root filesystem
using either ext2online (if it works), or resize2fs from rescue mode if
ext2online refuses to cooperate.
See the man pages for the various commands to see how they work. See
also the Linux LVM HOWTO:
More information about the users