Home » Operating Systems » Linux » RedHat » RedHat: Configure LVM on RedHat

RedHat: Configure LVM on RedHat

Logical Volume Manager (LVM) is a storage management system that lets you allocate and manage disk space for file systems or raw data. Historically, you treated your disks individually and in terms of fixed-sized partitions; each disk or partition held a file system, swap space, boot area, or raw data. With LVM, you do not need to assign a disk or fixed-sized partition to a single purpose. Instead, consider the disks as a pool (or volume) of data storage, consisting of equal-sized extents. Extents are allocated into virtual storage devices known as logical volumes, which can be treated as disks.

http://docstore.mik.ua/manuals/hp-ux/en/5992-4589/ch01s01.html

LVM provides the following capabilities:

  1. Logical volumes can be resized while they are mounted and accessible by the database or file system, removing the downtime associated with adding or deleting storage from a Linux server
  2. Data from one (potentially faulty or damaged) physical device may be relocated to another device that is newer, faster or more resilient, while the original volume remains online and accessible
  3. Logical volumes can be constructed by aggregating physical devices to increase performance (via disk striping) or redundancy (via disk mirroring and I/O multipathing)
  4. Logical volume snapshots can be created to represent the exact state of the volume at a certain point-in-time, allowing accurate backups to proceed simultaneously with regular system operation

http://www.redhat.com/magazine/009jul05/features/lvm2/

Configure LVM

During the installation of a new RedHat machine you will be prompted to create the partitions. This can be done automatically, in which case the installation process would create a default partition layout or manually configure sizes for the partitions to be used.

Redhat LVM

Click on the drop down menu an select Create custom layout

Redhat LVM

Click Next

Redhat LVM

The boot partition cannot reside on an LVM partition so we need to create a partition just for

/boot

. To do so, click New. A new window pops up.

  • Select
    /boot

    for Mount Point

  • Tick Force partition to be primary
  • Leave all other default values

Redhat LVM

The

/boot

mount point will now point to the partition

/dev/sda1

Redhat LVM

Now we need to create the LVM partition

Click on New

  • Select Physical volume(LVM) from the File System Type drop down menu
  • Select Fill to maximum allowable size to utilize all the remaining free space on the hard disk
  • Tick Force partition to be primary

Redhat LVM

Click OK

Redhat LVM

Click on LVM

Redhat LVM

Add the partitions to your liking. You do not need to assign the whole disk capacity to the partitions. The wonder of LVM is that you can set the minimum partition size required for your architecture and increase it at a later stage if need be. In my case I assigned 2GB for /, /usr, /var, /opt, /home and swap. The rest of my 30GB hard disk was left unassigned for future expansion.

Redhat LVM

Leave a Reply