Which commands can be used to change the partitioning using LVM?

ucs-3
lvm
resize

#1

Problem:

An additional physical volume should be added to a partition or a volume group or an LVM partition should be modified/adapted.

Solution:

Since Version 2.0 the use of LVM (Logical Volume Manager) has been supported for hard drive partitioning. LVM makes it possible to create a logical layer between the file system and the partition of a physical hard drive.

To do so, the file system is stored on a virtual partition, the ?logical volume?. The logical volume can be extended across multiple partitions and hard drives via the use of LVM and the size can also be subsequently adjusted. The subsequent addition of storage space, e.g, via additional hard drives or the enlarging of a virtual partition, only works if the already existing hard drive has been set up with LVM. Further information can be found with the command ?man? in the man pages or at http://de.wikipedia.org/wiki/Logical_Volume_Manager

The most important LVM commands can be found below along with a short explanation:

  • pvscan
    Searches all hard drives for physical volumes and generates a list including size information.

  • pvcreate
    Creates a physical volume on a partition.

  • pvmove
    Moves data from a physical volume to another physical volume within a volume group.

  • lvcreate
    Creates a logical volume on a volume group

  • lvextend
    Extends a logical volume to the specified size

  • lvreduce
    Reduces a logical volume to the specified size

  • vgscan
    Searches all hard drives for volume groups

  • vgcreate
    Creates a volume group from one or more physical volumes

  • vgreduce
    Reduces a volume group by removing an empty physical volume from the volume group

  • vgchange
    Enables or disables all or individual volume groups

  • vgrename, lvrename
    Renames a volume group or a logical volume

  • pvremove, lvremove, vgremove
    Removes a physical volume, logical volume or volume group

  • pvdisplay, lvdisplay, vgdisplay
    Displays the properties of a physical volume, logical volume or volume group