Home Miscellaneous How to replace a faulty drive in a Software RAID under Linux?

How to replace a faulty drive in a Software RAID under Linux?

by SupportPRO Admin
First we need to identify failed RAID Arrays. we can gather information from the following command’s output.
# cat /proc/mdstat
Removing the failed partition and disk
# mdadm –manage /dev/md0 –remove /dev/sdb1
=> Power down
# shutdown -h now
Then replace the drive and power up
In order to use the new drive we should have to create the same partition table structure that was on the old One.
# sfdisk -d /dev/sda | sfdisk /dev/sdb
After that we can add the partitions to the RAID Array.
# mdadm –manage /dev/md0 –add /dev/sdb1
Now, we can check the status of the partitions by issuing
# cat /proc/mdstat

First we need to identify failed RAID Arrays. we can gather information from the following command’s output.

# cat /proc/mdstat

Removing the failed partition and disk

# mdadm –manage /dev/md0 –remove /dev/sdb1

Power down

# shutdown -h now

Then replace the drive and power up

In order to use the new drive we should have to create the same partition table structure that was on the old One.

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

After that we can add the partitions to the RAID Array.

# mdadm –manage /dev/md0 –add /dev/sdb1

Now, we can check the status of the partitions by issuing

# cat /proc/mdstat

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment