Re: Repairing a RAID1 with non-zero mismatch_cnt, vol. 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

On 4/8/20 6:13 PM, Andrey ``Bass'' Shcheglov wrote:
Greetings,

[trim /]

Okay, so far, so good. I don't have any data, so a repair action can't
possibly harm it.

echo repair >>/sys/block/md4/md/sync_action

And the value of mismatch_cnt is still 384.

My first guess was that one of the hard drives was degrading, but
SMART attributes of both disks are ok (and nearly identical).


Can you please propose the explanation of the non-zero value?
And what else can I do to finally make it drop to zero (w/o
reassembling the whole array)?

This has always been a phenomenon possible with raid1, particularly when swap is involved anywhere on top, but also where filesystems don't exactly fill the raid device. Tail-packing inodes can leave strays, too.

My understanding is that it is an artifact of abandoned writes from buffer cache, where the write to at least one mirror made it to the device, but not to all mirrors. Logically harmless, except when scrubbing.

If it bothers you that much, fail one device, fill the entire device with zeroes (dd with bs=512), then repartition, --add and wait for rebuild complete. Then fail and do the same with the other. Use --replace with a temporary third device if degraded is too risky.

Phil



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux