[linux-lvm] Total free space using added VGs and LVs

Brian McCullough bdmc at bdmcc-us.com
Sat Oct 24 00:06:42 UTC 2009


On Fri, Oct 23, 2009 at 01:41:23PM -0700, Lou Arnold wrote:
> Ryan, Thanks for your suggestion. I know it works, but I had hoped to have a
> solution that didn't stop the whole system while I fixed it.
> 
> To Drew:
> I think you were quite right when you spoke about planning the file system.
> I've come to realize that my question is somewhat naive. One simply doesn't
> do what I wanted to exactly because there is no easy way to dismantle it. It
> would be better to partition off some part of the OS drive and add that to a
> new volume group (or a new logical volume group) and mount that under
> "/mnt", and then add whatever partitions on new drives to that logical
> volume. That logical volume could be dismounted and worked on, whereas
> whatever is under root cannot be worked on easily.


Lou,

I'm surprised that you haven't yet been told that one of the first rules of LVM is "don't use it for root!"  Actually, I don't really hold with that, but it is MUCH more important to plan what you are doing when you do have an LVM root partition.  As you have found, you can not manipulate an LVM partition while it is mounted. ( I know, there are ways for certain types of filesystems, but in general, the rule holds. )  That is especially true when the partition that you want to manipulate is root ( / ).

My general practice is to set up the following list of Logical Volumes ( the minimum which serves for most general purpose machines ): root, swap, home, usr, var.  I generally allocate somewhere around 1G for the root partition.  The others are sized appropriately for the environment.  That usually leaves me a lot of free space on modern drives for "data" space.

The recommendation that you should find a LiveCD at this point is probably one that you should respect.  Playing with mounted filesystems, particularly root, can rapidly lead you down a very nasty path.


Brian




More information about the linux-lvm mailing list