Skip to main content
Engineering LibreTexts

04-B.9.2: LVM Tools

  • Page ID
    26844
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    LVM Management Tools

    The Logical Volume Manager (LVM) provides tools to create virtual block devices from physical devices. Virtual devices may be easier to manage than physical devices, and can have capabilities beyond what the physical devices provide themselves. A Volume Group (VG) is a collection of one or more physical devices, each called a Physical Volume (PV). A Logical Volume (LV) is a virtual block device that can be used by the system or applications. Each block of data in an LV is stored on one or more PV in the VG, according to algorithms implemented by Device Mapper (DM) in the kernel.

    The tools are separated into commands associated with each of the components: the PV tools, the VG tools and the LG tools.

    The command tools dealing with the Physical Volume (PV) are as follows:

        pvchange   Change attributes of a Physical Volume.
        pvck       Check Physical Volume metadata.
        pvcreate   Initialize a disk or partition for use by LVM.
        pvdisplay  Display attributes of a Physical Volume.
        pvmove     Move Physical Extents.
        pvremove   Remove a Physical Volume.
        pvresize   Resize a disk or partition in use by LVM2.
        pvs        Report information about Physical Volumes.
        pvscan     Scan all disks for Physical Volumes.
    

    The command tools dealing with the Volume Group (VG) are as follows:

        vgcfgbackup   Backup Volume Group descriptor area.
        vgcfgrestore  Restore Volume Group descriptor area.
        vgchange      Change attributes of a Volume Group.
        vgck          Check Volume Group metadata.
        vgconvert     Convert Volume Group metadata format.
        vgcreate      Create a Volume Group.
        vgdisplay     Display attributes of Volume Groups.
        vgexport      Make volume Groups unknown to the system.
        vgextend      Add Physical Volumes to a Volume Group.
        vgimport      Make exported Volume Groups known to the system.
        vgimportclone Import and rename duplicated Volume Group (e.g. a hardware snapshot).
        vgmerge       Merge two Volume Groups.
        vgmknodes     Recreate Volume Group directory and Logical Volume special files
        vgreduce      Reduce a Volume Group by removing one or more Physical Volumes.
        vgremove      Remove a Volume Group.
        vgrename      Rename a Volume Group.
        vgs           Report information about Volume Groups.
        vgscan        Scan all disks for Volume Groups and rebuild caches.
        vgsplit       Split a Volume Group into two, moving any logical volumes from one Volume Group 
                      to another by moving entire Physical Volumes.
    

    The command tools dealing with the Logical Volume (LV) are as follows:

        lvchange    Change attributes of a Logical Volume.
        lvconvert   Convert a Logical Volume from linear to mirror or snapshot.
        lvcreate    Create a Logical Volume in an existing Volume Group.
        lvdisplay   Display attributes of a Logical Volume.
        lvextend    Extend the size of a Logical Volume.
        lvmconfig   Display the configuration information after loading
                    lvm.conf(5) and any other configuration files.
        lvmdiskscan Scan for all devices visible to LVM2.
        lvmdump     Create lvm2 information dumps for diagnostic purposes.
        lvreduce    Reduce the size of a Logical Volume.
        lvremove    Remove a Logical Volume.
        lvrename    Rename a Logical Volume.
        lvresize    Resize a Logical Volume.
        lvs         Report information about Logical Volumes.
        lvscan      Scan (all disks) for Logical Volumes.
    

    Adapted from:
    "LVM2 tools (man page)" by Multiple contributors is in the Public Domain, CC0


    04-B.9.2: LVM Tools is shared under a CC BY-NC license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?