Skip to content

Instantly share code, notes, and snippets.

@csamsel
Last active April 1, 2017 20:20
Show Gist options
  • Save csamsel/23b5a4e3f1812a34f7c6b304531215a0 to your computer and use it in GitHub Desktop.
Save csamsel/23b5a4e3f1812a34f7c6b304531215a0 to your computer and use it in GitHub Desktop.
create linux md raid5
# test disks
badblocks -t 0x00 -w /dev/sdb
# partition disks
parted -a optimal /dev/sdb
mklabel gpt
mkpart primary 1M 3000G
set 1 raid on
# create raid array
mdadm --create --verbose /dev/md0 --chunk=512K --level=5 --raid-devices=3 /dev/sd[bcd]1
# create ext4 filesystem
mkfs.ext4 -b 4096 -E stride=128,stripe-width=256,quotatype=usrquota -T huge -m 0 /dev/md0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment