Comment 12 for bug 383001

Revision history for this message
takbal (takbal) wrote :

Two related bugs:

https://bugs.launchpad.net/ubuntu/+bug/141435
https://bugzilla.novell.com/show_bug.cgi?id=328388

These turned my attention to HPA issues.
From hdparm man page:

[...] The difference between these two values indicates how many sectors
              of the disk are currently hidden from the operating system, in the form
              of a Host Protected Area (HPA). This area is often used by computer mak‐
              ers to hold diagnostic software, and/or a copy of the originally provided
              operating system for recovery purposes. To change the current max (VERY
              DANGEROUS, DATA LOSS IS EXTREMELY LIKELY), a new value should be provided
              (in base10) immediately following the -N flag. This value is specified
              as a count of sectors, rather than the "max sector address" of the drive.
              Drives have the concept of a temporary (volatile) setting which is lost
              on the next hardware reset, as well as a more permanent (non-volatile)
              value which survives resets and power cycles. By default, -N affects
              only the temporary (volatile) setting. To change the permanent (non-
              volatile) value, prepend a leading p character immediately before the
              first digit of the value. Drives are supposed to allow only a single
              permanent change per session. A hardware reset (or power cycle) is
              required before another permanent -N operation can succeed.

Looks like that may explain my problem if the live CD sets up a wrong permament HPA, but then corrects the non-permanent one to the good value, but the power off resets to the wrong value which invalidates the array. I will try dumping my drive's setting and check whether re-writing the correct number of sectors fixes it.