Bug#628668: mdadm: Impossible to clear the write-mostly flag in metadata
Anders Boström
anders at netinsight.net
Tue May 31 08:37:53 UTC 2011
Package: mdadm
Version: 3.1.4-1+8efb9d1
Severity: normal
When turning off write-mostly on a device in an active raid1 array,
using something like this:
echo -writemostly >/sys/block/md127/md/dev-md2/state
write-mostly is turned off:
flash:~ >mdadm -D /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Thu Oct 15 13:32:06 2009
Raid Level : raid1
Array Size : 312581688 (298.10 GiB 320.08 GB)
Used Dev Size : 312581688 (298.10 GiB 320.08 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Tue May 31 10:35:15 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : flash:mirror1 (local to host flash)
UUID : 066d46b2:5ca5113d:261cfcc0:626c2d62
Events : 842
Number Major Minor RaidDevice State
3 9 2 0 active sync /dev/md/2
2 8 3 1 active sync writemostly /dev/sda3
flash:~ >
But the metadata isn't updated:
flash:~ >mdadm -E /dev/md/2
/dev/md/2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 066d46b2:5ca5113d:261cfcc0:626c2d62
Name : flash:mirror1 (local to host flash)
Creation Time : Thu Oct 15 13:32:06 2009
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 625163376 (298.10 GiB 320.08 GB)
Array Size : 625163376 (298.10 GiB 320.08 GB)
Data Offset : 144 sectors
Super Offset : 8 sectors
State : clean
Device UUID : c995047e:7f56e673:9fc386be:dac782e1
Flags : write-mostly
Update Time : Tue May 31 10:29:08 2011
Checksum : 8020a873 - correct
Events : 842
Device Role : Active device 0
Array State : AA ('A' == active, '.' == missing)
flash:~ >
And after a reboot, md2 is flagged as writemostly again.
/ Anders
More information about the pkg-mdadm-devel
mailing list