Some RHEL software RAID commands

Copy partitions from good drive to new drive:

sfdisk -d /dev/sda | sfdisk /dev/sdb

or

sfdisk -d /dev/sda | sfdisk --force /dev/sdb

Add partitions back into RAID:

mdadm /dev/md0 --add /dev/sdb1
mdadm /dev/md1 --add /dev/sdb2

Check status:

cat /proc/mdstat

or

mdadm --detail /dev/md0

Leave a Reply

Your email address will not be published. Required fields are marked *