Skip to content

Instantly share code, notes, and snippets.

@ThePotioner
Last active July 14, 2025 03:07
Show Gist options
  • Save ThePotioner/26569b9dbe7b166f5501fac4e29788ae to your computer and use it in GitHub Desktop.
Save ThePotioner/26569b9dbe7b166f5501fac4e29788ae to your computer and use it in GitHub Desktop.
mdadm + LVM + VDO + XFS
## mdadm (RAID5)
mdadm --create --verbose /dev/md0 --chunk=256 --level=5 --raid-devices=4 /dev/sdX /dev/sdX /dev/sdX /dev/sdX
mdadm --detail --scan >> /etc/mdadm.conf
## LVM (w/ VDO)
pvcreate /dev/md0
vgcreate MyVG /dev/md0
lvcreate --vdo --vdosettings 'vdo_slab_size_mb=2048' -l 100%FREE -n MyLV MyVG
## Format md0(/dev/MyVG/MyLV, w/ XFS)
# mkfs.xfs -K /dev/vg-name/vdo-name (in RHEL 9 Guide)
# https://docs.redhat.com/ko/documentation/red_hat_enterprise_linux/9/html/deduplicating_and_compressing_logical_volumes_on_rhel/creating-and-mounting-an-lvm-vdo-volume_creating-a-deduplicated-and-compressed-logical-volume
mkfs.xfs -K /dev/MyVG/MyLV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment