12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Understanding LVM 173To increase the size of an existing logical volume or to add a logical volume, you firstneed free disk space. This free disk space can either be disk space that already exists in thesystem as unpartitioned space (not part of an existing logical volume), an unused partition,physical volume that is not already a member of a logical volume, or disk space as aresult of installing one or more additional hard drives to the system. The disk space cancome from removing a logical volume to create space in the logical volume group,however, this is not common because if the LV already exists, it is most likely alreadybeing used and cannot be easily deleted without losing data.After deciding which free disk space to use, the basic steps for increasing the size of alogical volume are as follows:1. Create new physical volume from free disk space.2. Add physical volume to the logical volume group.3. Expand the size of the logical volume to include the newly added disk space in thevolume group.4. Expand the filesystem on the logical volume to include the new space.To add a logical volume, use the following steps:1. Create new physical volume from free disk space.2. Add physical volume to the logical volume group.3. Create a logical volume with the new space in volume group.4. Create a filesystem on the logical volume.5. Create a mount point.6. Mount the logical volume.77. Test the filesystem.8. Add the new mount point to /etc/fstab.TIPIf you prefer a graphical interface, the system-config-lvm utility can be used tomodify your LVM configuration.Creating a Physical VolumeTo create a new physical volume from free hard drive space or a hard drive partition, usethe pvcreate command:pvcreate Replace with the device name of the hard drive:pvcreate /dev/sda

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!