Skip to content

Instantly share code, notes, and snippets.

@fxfactorial
Forked from ryandotsmith/lvmrad.sh
Created December 28, 2023 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fxfactorial/02f76eb4045b363c646baec230046853 to your computer and use it in GitHub Desktop.
Save fxfactorial/02f76eb4045b363c646baec230046853 to your computer and use it in GitHub Desktop.
Setting up Ubuntu LVM Raid 0 with 4 NVMe M.2 Drives
lslbk # find drives to add (eg /dev/nvmeXn1)
pvcreate /dev/nvme1n1
pvcreate /dev/nvme2n1
pvcreate /dev/nvme3n1
pvcreate /dev/nvme4n1
vgcreate vg1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 /dev/nvme4n1
lvcreate --type=raid0 -l100%FREE -n rd1 vg1
mkfs.ext4 /dev/vg1/rd1
mkdir /storage #customize your mount point
echo '/dev/vg1/rd1 /storage ext4 defaults 0 0' >> /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment