Comment 14 for bug 383001

Revision history for this message
takbal (takbal) wrote :

I can confirm that indeed HPA was the problem in my case. dmesg log showed the "HPA locked" message in the libata part for the ata0 drive. This forced value made my arrays accessible until the next hard boot. Only /dev/sda was affected. Finally, I got the total sector num with the live CD with

# hdparm -N /dev/sda

/dev/sda:
 max sectors = 976773168/976773168, HPA is disabled

and then setting the permanent value by

# hdparm -N p976773168 /dev/sda

entirely fixed my problem. Now the system comes up without errors from cold boot.

Actually I am not sure that this is the correct setting, as most probably the HPA area was set up by Intel RAID to write something there. Now the HPA is disabled and the operating system can theoretically overwrite the protected area. As the partitioning was created earlier, these sectors are most probably unused, so I hope it is going to work until I do not tamper with the partition table (however it would be nice if somebody could confirm that this is safe).

Looks like other people noticed this HPA issue and started adding ICH10R support:
https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/372170

However I am not sure how the live CD problem is related to that, as I had no problems with dmraid. Probably the live CD would not affect my system with the libata.ignore_hpa=0 setting as suggested elsewhere, but THIS IS NOT THE DEFAULT. Probably the same libata setting destroyed the array first, then when I was fixing it through Windows I forced the other drive to conform to the new geometry. Because the permanent setting was not changed properly, the problem came back after cold boots.

Anyway, I think it is unacceptable that the live CD touches the array in a way which screws it up. Why in hell does it change the HPA sector settings by default??? I understand now that it is quite possible that the first change was only temporary and a cold boot could have fixed the problem. Still, some warning could be given which says that if you have problems with the RAID after booting the live CD, try cold boot.

I understand that libata.ignore_hpa=0 makes other people's HDD inaccessible, but making something inaccessible sounds less serious to me than *trashing* the arrays which may potentially result in data loss. Definitely the less evil should be the default. Even better, it should be an option at boot, or at least a textual warning should be given.