Create software raid10


Quick guide to create a raid10 array..

See what disks/partitions you have..
ls -1 /dev/sd*

Make or update raid type partitions on any disks you want in the array..
fdisk /dev/sdc
'n' for new partition
't' to set type to 'fd' (raid)
'w' to save changes and exist fdisk.

Create the array (at least 4 disks)..
mdadm --verbose --create /dev/md1 --level=raid10 --raid-devices=10 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1

See status of the raid initialization..
cat /proc/mdstat

Save the raid details to the conf file (so it is still found after a reboot)..
mdadm --detail --scan > /etc/mdadm.conf

Make the filesystem on the new array..
mkfs.ext4 /dev/md1

Mount in the usual way.

  Tags:

Looking for great online sysadmin training in Linux, Security & Hacking and many others?

Back