RedHat LVM Doc
30 Oct 2016Logical Volume Manager
- disks or partitions are managed as Physical Volumes (PV)
pvcreate /dev/xda1
lvmdiskscan
to identify all items which can be used as PVs- resize/remove the PVs w/
pvresize or pvremove
- more PVs can be merged/striped into Volume Group (VG)
vgcreate volgrp1 /dev/sdd1
- adding PVs to VGs
vgextend volgrp1 /dev/sde1
vgmerge / vgsplit
- more VGs can be merged into Logical Volumes (LV) - their size is considered in minimal extensible chunks, or extents
- LVs can be thin-provisioned, appearing as more available space than actual space due to sharing between clients
- SSDs can be used as cache for spinning disks
- clustering can be managed by the Clustered Logical Volume Manager (CLVM)
-
LVs can be converted using
lvconvert
from RAID to linear and vice-versa - LVs commands:
lvcreate -L 10G volgrp1
create liniar 10G volumelvcreate -L 10G -i 2 -n stripedvol volgrp1
create striped 10G volume, number of stripes=2, name=stripedvol, default stripe size is 64KB- -m # of copies for RAID1
- -i # of stripes for RAID 4/5/6
- recovery rate can be throttled
- -T to create a Thin pool
- lvs/pvs commands can be used in scripting or to monitor the status of the pools/volumes
- RAID 1/4/5/6/10
- details from https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Logical_Volume_Manager_Administration/index.html