Unfortunately certain models of Gigabyte motherboards play very nasty tricks with your hard disks — entirely without your permission — by setting up Host Protected Areas. These unauthorised modifications to your hard disk can cause the loss of hundreds of Gigabytes of data. Personally I lost a 1.2TB RAID 0 array. [1]
I do not know which models of Gigabyte motherboards are affected but the Gigabyte GA-MA74GM-S2H certainly is; according to this post on opensolaris.org, the GA-G31M-S2L is also affected. If anybody else has experienced this, please post a comment.
The Host Protected Area means that a certain area of the disk is reserved. That’s not too bad on a disk that has never been used in another system. You lose a few tens of megabytes, which isn’t too significant on disks of hundreds of gigabytes. However, if the system has already been used in another system, and contains a partition table or is part of a RAID array, or LVM volume, your data will not be accessible and will essentially be lost.
I unfortunately discovered this problem myself when I upgraded my home Linux-based home fileserver. I upgraded from an Asus motherboard. I had four 300GB IDE disks that had been part of a RAID 0 array (yes, I know about the data loss implications of RAID 0; they’re acceptable for my use). I discovered that Linux’s md could not reassemble two of the disks back into the RAID array. The other two were fine — these were connected to a Promise IDE controller. As the disks were around four years old and had been on 24×7 for that time, I came to the conclusion — although unlikely — that both of the disks had died simultaneously.
Hindsight is a wonderful thing. Unfortunately I had never had any prior experience of Host Protected Areas. However, whilst debugging, I should have noticed the following:
hde: max request size: 512KiB hde: Host Protected Area detected. current capacity is 586070255 sectors (300067 MB) native capacity is 586072368 sectors (300069 MB) hde: Host Protected Area disabled. hde: 586072368 sectors (300069 MB) w/8192KiB Cache, CHS=36481/255/63, UDMA(100) hde: cache flushes supported hde: hde1 hde2 hdg: max request size: 512KiB hdg: Host Protected Area detected. current capacity is 586112591 sectors (300089 MB) native capacity is 586114704 sectors (300090 MB) hdg: Host Protected Area disabled. hdg: 586114704 sectors (300090 MB) w/16384KiB Cache, CHS=36483/255/63, UDMA(100) hdg: cache flushes supported hdg: hdg1 hdg2
Unfortunately the motherboard, without my permission, was denying md access to part of the disk, meaning that md could not assemble it into the RAID array. Data loss bugs are some of the the worst kind of bugs and I find this behaviour of this motherboard rude and entirely unacceptable.
For me, this wasn’t terrible. Most of the data was backed up to tape, and thus restorable, and what wasn’t, was easily replaceable. But I hope that this post helps someone that thinks that they have lost their data, and encourages Gigabyte to change the unacceptable behaviour of their motherboards.
[1] Sure, using RAID 0 dramatically increases the risk of data loss, and that was acceptable to me as it was personal use, not business critical, and I was happy with the possiblity of a disk dieing. I’m not happy with the fact that Gigabyte hardware behaves in unexpected and totally different ways to all of the (considerable quantity of) other hardware that I’ve used.