LVM

LVM stands for Logical Volume Manager. It provides a way for extending filesystems by adding new partitions to the "logical volume".

Creating the initial logical volume

  1. Create the partition(s) on the device
    # fdisk <device> 
  2. Create the Physical Volume entry
    # pvcreate <Partition Device>
  3. Create the Volume Group
    # vgcreate <GroupName> <PhysicalVolume> 
  4. Verify the Volume Group was created. Take note of the "Total PE" field
    # vgdisplay 
  5. Create the Logical Volume
    # lvcreate --extents <Total PE> <VolumeGroup> 
  6. Verify the Logical Volume was created
     # lvdisplay
  7. Format the Logical Volume

     # mke2fs /dev/<VolumeGroup>/<LogicalVolume> 

Extending a filesystem running on LVM (untested and incomplete)

  1. Create partition of new device

     # fdisk <device> 
  2. Create the new Physical Volume

     # pvcreate <Partition> 
  3. Add the Physical Volume to the Volume Group

     # vgextend ... 
  4. Extend the Logical Volume

     # lvextend ... 
  5. Resize the filesystem

     # ext2online/resize2fs ... 

LVM (last edited 2013-09-18 06:09:34 by localhost)