Skip to content

Instantly share code, notes, and snippets.

@ryandotsmith
Created January 14, 2023 08:29
Show Gist options
  • Save ryandotsmith/7012c3645de3d910fe6ce25341da3c7d to your computer and use it in GitHub Desktop.
Save ryandotsmith/7012c3645de3d910fe6ce25341da3c7d 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