Skip to content

Instantly share code, notes, and snippets.

@Makistos
Last active September 27, 2017 06:58
Show Gist options
  • Save Makistos/d6f0c41f928139d2f3d3b8278b4de2ff to your computer and use it in GitHub Desktop.
Save Makistos/d6f0c41f928139d2f3d3b8278b4de2ff to your computer and use it in GitHub Desktop.
How to create a simple 2-disk LVM ext4 partition
# A very comprehensive document: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Logical_Volume_Manager_Administration/index.html
# Assuming both disks have a partition created already. Think they should be already lvm2 pv?
sudo pvcreate /dev/sdc1 /dev/sdd1
sudo vgcreate workvg /dev/sdc1 /dev/sdd1
sudo lvcreate -l 100%FREE -n worklv workvg
sudo mkfs.ext4 /dev/workvg/worklv
sudo echo '/dev/workvg/worklv /work ext4 defaults 0 2' >> /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment