lvm notes

Current releases of Red Hat Enterprise and Fedora Linux default to managing disk storage using logical volumes. As a result anyone who administers those kinds of systems should probably be familiar with LVM (Logical Volume Manager).

There’s lots of doc on using LVM. For Fedora there is the Storage Administration Guide released with Fedora 14. For Red Hat Enteprise Linux, there is the Logical Volume Manager Administration Guide. Both of these are good sources of information on the basics of administering storage using logical volumes.

Here’s a nice illustrated, step-by-step guide that explains it all with a practical example.

This is a pretty comprehensive wiki article that could be considered an “LVM cheat sheet”.

A few quick commands for checking on logical volumes and volume groups follow.

[root@myhost ~]# lvscan
  ACTIVE            '/dev/fedora/root' [29.30 GiB] inherit
  ACTIVE            '/dev/fedora/home' [19.53 GiB] inherit
  ACTIVE            '/dev/fedora/swap' [3.91 GiB] inherit
  ACTIVE            '/dev/fedora/data' [179.91 GiB] inherit

Finds logical volumes that are mounted by the system.

[root@myhost ~]# lvdisplay /dev/fedora/root
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                cceTyX-Fs54-Myzz-CpAp-MTB4-FeEf-6boHBL
  LV Write Access        read/write
  LV Creation host, time localhost, 2013-07-31 11:23:09 -0400
  LV Status              available
  # open                 1
  LV Size                29.30 GiB
  Current LE             7500
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

Display details about a particular logical volume.

[root@myhost ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "fedora" using metadata type lvm2
This entry was posted in System Administration on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).