Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Ubuntu 8.10 software RAID5 setup that uses 4 active disks and 1 spare. The spare disk has three partitions, one of which is devoted to the spare function. I am using a second partition on the spare disk to be a home to the write-intent bitmap file specified with the --bitmap option in the mdadm command line. Whenever I do a mdadm --detail -v /dev/md2 after reboot, it fails to show the Intent Bitmap. I have to manually do an mdadm command to get the Intent Bitmap going again.

My chief concern is that a disk will fail, perhaps under the stress of a power outage, and then, when the machine reboots, it will start resyncing to the spare, but without taking notice of the Intent Bitmap. Can mdadm (or mdadm.conf, or any other config file) be used to instruct mdadm or Ubuntu to set up the write-intent bitmap on reboot? Will that help to allow a rapid transition from an inconsistent state to a consistent & clean state?

For the uninitiated: the write-intent bitmap is a small file that tracks the intended write that will be placed on RAID, so that if the write does not complete to all disks, the processor has only to look to those sectors/tracks where the write was incomplete in order to assure consistency among the disks. Without that file, all tracks are treated as suspect, and a data-intensive operation that takes (what hours, days?) begins to bring everything consistent.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You probably just need to set it in the configuration file:

ARRAY
...
bitmap=
The option specifies a file in which a write-intent bitmap  should  be  found.
When  assembling  the array,  mdadm  will provide this file to the md driver
as the bitmap file.  This has the same function as the --bitmap-file option
to --assemble.
share|improve this answer
add comment

It should be noted that enabling the bitmaps will cause a large performance hit.

Add a bitmap with the following command: mdadm /dev/mdX -Gb internal

Where X is the number that represents your array.

http://en.gentoo-wiki.com/wiki/RAID/Software#To%5Fturn%5Fon%5Fwrite-intent%5Fbitmapping

share|improve this answer
1  
The performance hit is different with an external bitmap versus an internal one. Since the original poster explicitly says he is using an external bitmap, this really doesn't apply. Also, it doesn't address their question. –  Christopher Cashell Dec 28 '09 at 21:47
    
Just to mention: I use internal write-intent bit-map with rather huge chunks, so performance penalty is neglectful whilst it speeds up re-sync significantly anyway. –  poige Apr 20 '11 at 2:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.