LVM
LVM 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 prefix:
pv...
- 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.
-
LVM utility prefix:
-
Volume Groups:
-
LVM utility prefix:
vg...
- 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.
-
LVM utility prefix:
-
Logical Volumes:
-
LVM utility prefix:
lv...
(generic LVM utilities might begin withlvm...
) - 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.
-
LVM utility prefix:
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 LVM (Perfect for rescue)rescue env)
pvscan
vgscan
vgchange -ay
lvscan
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