-   Linux - Server (
-   -   Software RAID on ubuntu (

rolnik 09-24-2009 07:57 PM

Software RAID on ubuntu
I have a 4 disk RAID5 with an extra disk used as a spare, and designated as such with mdadm. Does anyone know what happens when one of the four fails through natural attrition? Does the spare automatically come online, or does the admin have to use mdadm to 'fail' the disk that isn't working correctly?

Second question. Lets say that there is a power outage (or my battery backup isn't fully charged). How do I make the write-intent bitmap persistent between reboots. Right now I have to manually do a mdadm --bitmap=/tmp1/md2bitmap (or similar command) to tell the drives to track this info after every boot. If resyncing occurs on reboot, how will the drives know that they only have to reconcile according to the bitmap?

Perhaps there is a config file I should be pairing the /dev/md2 RAID array with the bitmap? I don't see how to do it using mdadm.conf.


hexahost 10-01-2009 06:32 AM

First of all /etc/mdadm/mdadm.conf is a automatically created file. This is not a standard configuration file that md service will read configurations from. It is a file generated when you use mdadm commands.
Using command line is the recommended one.

Refer :

Just my two cents.

DrLove73 10-01-2009 07:59 AM

Only time you need to mess with /etc/mdadm/mdadm.conf is with LiveCD when you need to access your underlying RAID and there is problem with it, so LiveCD is unable to mount it. There is explanation of this process somewhere on the internet.

Take a look at this examples , particulary 6. 7. and 8.

From Linux RAID Wiki, section 1.4, RAID 5:

If one of the disks fail, all data are still intact, thanks to
the parity information. If spare disks are available,
reconstruction will begin immediately after the device failure.
If two disks fail simultaneously, all data are lost. RAID-5 can
survive one disk failure, but not two or more.

BTW, there are experts that recommend avoiding RAID 5 since random writes are very slow, and that two disk failures will bring the RAID down for good: You might be better of with RAID 6. It has all the benefits od RAID 5, but it also has double parity and instead of having spare disk and waiting for RAID rebuild, you are actually using that disk to provide redunancy even if two disks fail together.

All times are GMT -5. The time now is 11:33 AM.