Creating LVM

– Initialize Physical Volumes (PV) to be managed by LVM

$ pvcreate /dev/vdb1

– Create a Logical Volume Group (VG) and attach PVs

$ vgcreate myVG /dev/vdb1 /dev/vdc1 …

– Create Logical Volume on VG

$ lvcreate -L 1G -n myLV myVG

– Format and mount

– Resize (extend/reduce) a logical volume

$ lvextend –resizefs -L 800M /dev/myVG/myLV

$ lvreduce –resizefs -L 100M /dev/myVG/myLV

– Create snapshot

$ lvcreate –size 50M –snapshot –name myLVSnpsht /dev/myVG/myLV

Managing a BtrFS

Partition volumes and format with brtfs, verify

$ parted –script /dev/vdc “mklabel gpt”

$ parted –script /dev/vdc “mkpart primary 1 30%”

$ mkfs.btrfs /dev/vdc1

$ sudo btrfs filesystem show /dev/vdc1

$ mount /dev/vdc1 /mnt/mymntpoint

Resize Partition and Verify Filesystem

$ parted –script /dev/vdc “mkpart primary 30% 60%”

$ sudo btrfs filesystem show /dev/vdc1

Unite several volumes under one filesystem

$ btrfs device add /dev/vdc2 /mnt/mymntpoint

Balance data across united volumes

$ btrfs balance start -d -m /mnt/mymntpoint

Create RAID with BtrFS

$ sudo mkfs.btrfs -m raid10 -draid10 /dev/vdc /dev/vdd /dev/vde /def/vdf -f

Create AuFS - Overlayfs

$ mount -t overlay overlay -o lowerdir=/dir1:/dir2, upperdir=/upper, workdir=/work /merged