July 1st, 2015

How to create an LVM volume

Because I always forget how to do this:

pvcreate /dev/xvdf
vgcreate vg00 /dev/xvdf
lvcreate -l 100%VG -n lv00 vg00
mkfs -t ext4 /dev/mapper/vg00-lv00
mkdir /data
mount -t ext4 -onoatime /dev/mapper/vg00-lv00 /data