1

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.

2 Answers2

2

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.
LapTop006
  • 6,496
  • 20
  • 26
-1

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_turn_on_write-intent_bitmapping

kovert
  • 437
  • 3
  • 8
  • 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 02:39