Mark Lord wrote:
Justin Piszcz wrote:
..
One would think if the controller overwrites bits on the device when
mdadm assembles the raid device it would kick it out of the array for
being unclean or find a lot of mismatches on the array or is that the
wrong idea?
..
No, there's nothing in mdadm that I know of which will detect this.
You'd basically need to run a job in the background, reading/comparing
all of the mirrors with each other.
But even that mightn't work, since the BIOS would have corrupted the
exact same sector on every drive attached to it, quite possibly with
the same contents, so the mirror-compare wouldn't see anything different.
The only way to know for sure is to test it manually,
by zeroing the entire drive, power/reboot, scan the entire
drive for non-zero. Then repeat with a different pattern
just in case "zero" is what the BIOS wrote.
Very very messy, at least for the Highpoint RAID cards.
But we really don't know about what the others do,
apart from some historical data in the dm code.
..
Oh, and from the existing sata_mv.c driver code:
if (pdev->vendor == PCI_VENDOR_ID_TTI &&
(pdev->device == 0x2300 || pdev->device == 0x2310))
{
/*
* Highpoint RocketRAID PCIe 23xx series cards:
*
* Unconfigured drives are treated as "Legacy"
* by the BIOS, and it overwrites sector 8 with
* a "Lgcy" metadata block prior to Linux boot.
*
* Configured drives (RAID or JBOD) leave sector 8
* alone, but instead overwrite a high numbered
* sector for the RAID metadata. This sector can
* be determined exactly, by truncating the physical
* drive capacity to a nice even GB value.
*
* RAID metadata is at: (dev->n_sectors & ~0xfffff)
*
* Warn the user, lest they think we're just buggy.
*/
printk(KERN_WARNING DRV_NAME ": Highpoint RocketRAID"
" BIOS CORRUPTS DATA on all attached drives,"
" regardless of if/how they are configured."
" BEWARE!\n");
printk(KERN_WARNING DRV_NAME ": For data safety, do not"
" use sectors 8-9 on \"Legacy\" drives,"
" and avoid the final two gigabytes on"
" all RocketRAID BIOS initialized drives.\n");
}
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html