Skip to main content

LVM

TODOLVM functions by layering abstractions on top of physical storage devices. The basic layers that LVM uses, starting with the most primitive, are.

    Physical Volumes:
      LVM utility prefixpv.... DOCUMENT THIS Description: Physical block devices or other disk-like devices (for example, other devices created by device mapper, like RAID arrays) are used by LVM as the raw building material for higher levels of abstraction. Physical volumes are regular storage devices. LVM writes a header to the device to allocate it for management. Volume Groups:
        LVM utility prefixvg... Description: LVM combines physical volumes into storage pools known as volume groups. Volume groups abstract the characteristics of the underlying devices and function as a unified logical device with combined storage capacity of the component physical volumes. Logical Volumes:
          LVM utility prefixlv... (generic

          here'sLVM commands 

          utilities might begin with lvm...) Description: A volume group can be sliced up into any number of logical volumes. Logical volumes are functionally equivalent to partitions on a physical disk, but with much more flexibility. Logical volumes are the primary component that users and applications will interact with.

          Create a volume group

          pvcreate /dev/sda1 /dev/sdb1
          vgcreate vol_group_name /dev/sda1 /dev/sdb1
          lvcreate -l 95%FREE -n drive_name vol_group_name

          View info on group

          pvscan
          pvdisplay
          vgdisplay
          lvdisplay

          Mount lvmLVM (Perfect for rescue)

          sudo pvscan                 
          sudo vgscan                 
          sudo                 
          vgchange -ay           
          sudo lvscan    
          sudo    
          mount /dev/VolGroup00/LogVol00 /mnt

          Full Doc:

            http://xmodulo.com/use-lvm-linux.html https://www.digitalocean.com/community/tutorials/an-introduction-to-lvm-concepts-terminology-and-operations https://www.digitalocean.com/community/tutorials/how-to-use-lvm-to-manage-storage-devices-on-ubuntu-16-04