Installation guide

Chapter 3. LVM Administration Overview
18
The following is a summary of the steps to perform to create an LVM logical volume.
1. Initialize the partitions you will use for the LVM volume as physical volumes (this labels them).
2. Create a volume group.
3. Create a logical volume.
After creating the logical volume you can create and mount the file system. The examples in this
document use GFS2 file systems.
Note
Although a GFS2 file system can be implemented in a standalone system or as part of a cluster
configuration, for the Red Hat Enterprise Linux 6 release Red Hat does not support the use
of GFS2 as a single-node file system. Red Hat will continue to support single-node GFS2 file
systems for mounting snapshots of cluster file systems (for example, for backup purposes).
1. Create a GFS2 file system on the logical volume with the mkfs.gfs2 command.
2. Create a new mount point with the mkdir command. In a clustered system, create the mount
point on all nodes in the cluster.
3. Mount the file system. You may want to add a line to the fstab file for each node in the system.
Alternately, you can create and mount the GFS2 file system with the LVM GUI.
Creating the LVM volume is machine independent, since the storage area for LVM setup information
is on the physical volumes and not the machine where the volume was created. Servers that use the
storage have local copies, but can recreate that from what is on the physical volumes. You can attach
physical volumes to a different server if the LVM versions are compatible.
3.3. Growing a File System on a Logical Volume
To grow a file system on a logical volume, perform the following steps:
1. Make a new physical volume.
2. Extend the volume group that contains the logical volume with the file system you are growing to
include the new physical volume.
3. Extend the logical volume to include the new physical volume.
4. Grow the file system.
If you have sufficient unallocated space in the volume group, you can use that space to extend the
logical volume instead of performing steps 1 and 2.
3.4. Logical Volume Backup
Metadata backups and archives are automatically created on every volume group and logical volume
configuration change unless disabled in the lvm.conf file. By default, the metadata backup is stored