All Categories


Useful mdadm commands

Some of the most basic commands to manage a Linux Software Raid Array

Clear RAID Disk
mdadm --zero-superblock /dev/sda
Create RAID1 Device
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
Replace Failed Disk in RAID1 Device
STEP# 1 Ensure disk is marked failed
mdadm --manage /dev/md0 --fail /dev/sda1
STEP# 2 Remove the failed disk
mdadm --manage /dev/md0 --remove /dev/sda1
STEP# 3 Add new disk
mdadm --manage /dev/md0 --add /dev/sda1
View RAID Device Status and Sync Progress
cat /proc/mdstat



About the Author

Administrator

Most Viewed - All Categories