Try New Technology

Rebuild FreePBX (CentOS 5) Software RAID after hard drive failure

by on Feb.02, 2014, under Techie

I was testing how well FreePBX 5.211.65-5 (Asterisk 11) would deal with loosing a drive. After unplugging the drive and finding that it boots fine, I reconnected the drive an assumed it would re-sync the Software RAID. Sadly that did not happen and when looking at System Admin -> Storage I saw sdb green, then another sdb in red. After some hunting online I found the following solution:

Via Console/SSH:

See the status of the RAID by:

cat /proc/mdstat

I noticed that md0 and md2 were only 2/1 drives and that sda1 and sda3 (respectively) were missing, but md1 had sda2 and sdb2 listed fine.

I then ran the following two commands and waited for the Software RAID to resync/recover:

mdadm /dev/md0 --add /dev/sda1
mdadm /dev/md2 --add /dev/sda3

Now if I run

cat /proc/mdstat

It shows they are waiting to resync and one is currently in recovery state.

NOTE: Remember lsblk is your friend when you are unsure of what drives are part of which RAID.


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...