|
Linux has a feature called LVM that allows you to resize partition sizes and expand
partitions across multiple disks among other features. Your virtual machine comes with
all the partitions except for the root partition setup using LVM. To allow you to have
the most flexibility, we have started each partition as small as we could to allow you to
do what you want with the extra space given to you. So its important that you understand how
to use LVM commands so that you can fully utilize the full disk space that you have been
allocated.
There are a jungle of terms out there, but it really doesn't have to be that confusing.
- Physical Volumes - A physical volume is a disk that has been allocated for use in LVM.
- Volume Group - A volume group consists of one or more physical volumes clustered together.
- Logical Volume - This is the actual volume that a filesystem resides on.
We have already setup all this for you, the only thing that you need to concern youself with for now
is how to resize logical volumes and resize the filesystem on it to fit.
This is a simple task, just run the following as root, which will
extend the logical volume known as 'var' by 512 megabytes.
lvextend -L+512M /dev/CustVG/var
Note: The name of the logical volume is not directly tied to the disk
partition that it is used for. Most of the time it will be, and we do so
because it is convenient.
Now expand the filesystem to fit the new size of the logical volume. We are
using reiserfs filesystems because they are fast and flexible for the purpose
of Xen virtual machines.
resize_reiserfs /dev/CustVG/var
This will resize the filesystem while it is still mounted, so there is no need
to unmount the filesystem or restart your virtual machine.
That is just about all you need to know about LVM to get started with your virtual machine. You can keep
an eye on how much disk space is being used by running the following command:
df -h
You don't need the -h option, but it makes it more readable.
Here are some links to more information about LVM2 for Linux.
Modified: 2007-07-10 01:35:51
|