Linux Sysadmin Test Prep
Logical Volume Management (LVM)
Logical Volume Management (LVM)
logical volumes
fdisk /dev/sdX
(t 8e; for each)partprobe -s
pvcreate /dev/sdX /dev/sdY
pvdisplay
orpvs -v
wipefs /dev/sdX
may clear errors
vgcreate <VG> /dev/sdX /dev/sdY
vgdisplay -v
orvgs
lvcreate -L <SIZE> -n <LV> <VG>
(-L fixed size; -l percentage of remaining space)lvdisplay
orlvs
mkfs.ext4 /dev/<VG>/<LV>
mount /dev/<VG>/<LV> <MountPoint>
lvresize -r -L <SIZE> <LV>
(-L -2.5G; -l +100%FREE)vgextend <VG> /dev/sdZ
lvremove
,vgremove
,pvremove
Edit this page on GitHub