shrinking LVM-volume and add new volumes

Andrei Pascal andrei at romsym.ro
Wed May 9 07:39:35 UTC 2007


On Mon, 2007-05-07 at 15:32 +0200, Götz Reinicke wrote:
> Hi,

Hello,

> may be I've been a little bit to fast setting up a new RHEL5 server :-)
> 
> I've created a volumegroup on a hardwareraid about 1.8TB and there is 
> one logical volume mounted on / using ext3.

Ouch :(

> Now I do need some more volumes because of getting better quota 
> management; e.g. a temporary share without quota on or special project 
> accounts.
> 
> The simple question: How to proceed? I've been reading some RH Manuals 
> and home how tos, but I'm not realy shure if I got all things right. 
> (resize filesystem, change logic volume size, add a new logic volume, 
> put a filesystem on it, mount it somewhere, copy the stuff from the 
> "big" volume to the new, ...)
> 
> Hase someone a simple how to what steps have to be done? May be it's 
> also a problem, that the volume is mounted as /.

Well, given that ALL of the vol group is allocated in a HUUUUUUUUGE
logical volume which happens to be root, you have a small problem. (BTW,
did you tell the installer to create the default layout? Beacuse that's
how it looks from here...)

The most comfortable way to do it is to reboot the system in rescue
environment - that's because you need the root partition to be
unmounted. There you can reduce the filesystem on the existing root
partition to a reasonable size - say 12 GB, that shoult be enough.
Afterwards, you have to reduce the logical volume that is allocated for
root to slightly more than the FS. After you finish these operations,
you can safely reboot your system and voila: you have 1.8 TB - 12 GB
unallocated space in your volume group, space you can use as you wish.

> Thanks in advance for any hints and tips!

You're welcome. However, next time you install an OS - whatever OS -
plan your installation carefully or try to test it first on a spare machine.

> Regards
> 
> Götz

Best regards,

Andrei




More information about the redhat-list mailing list