mdadm / lvm misc commands

mdadm –create /dev/md3 –level=raid6 –chunk=256 –raid-devices=5 /dev/sd[cdghi]2 <- create raid6 mdadm --readwrite /dev/md3 <- start resync pvcreate /dev/md3 <- create physical lvm group vgcreate raid6 /dev/md3 <- create volume group raid6 on device /dev/md3 lvcreate -n storage -l 100%FREE raid6 <- create logical volume on raid6 volume group mkfs.ext4 -m 0 /dev/raid6/storage <- ext4 fs with 0% reserved root space mdadm --add /dev/md3 /dev/sde5 /dev/sdb5 <- add more drives to /dev/md3 mdadm --grow /dev/md3 --size=max lvextend -l 100%PVS /dev/raid6/storage <- extend the logical volume resize2fs /dev/raid6/storage <- extend fs