# hdparm -N -p7814037168 /dev/sdb
/dev/sdb:
attempting to set PIO mode to -775897424
HDIO_SET_PIO_MODE failed: Inappropriate ioctl for device
max sectors = 7814035055/7814037168, HPA is enabled
Špatně zadáno, správně to je:
hdparm -N p7814037168
nebo
hdparm -Np7814037168
Ta pomlčka před p ve vašem pokusu vadí. Viz manuálová stránka k hdparm:
-N Get/set max visible number of sectors, also known as the Host Protected Area setting. Without a parameter, -N
displays the current setting, which is reported as two values: the first gives the current max sectors setting,
and the second shows the native (real) hardware limit for the disk. The difference between these two values in‐
dicates how many sectors of the disk are currently hidden from the operating system, in the form of a Host Pro‐
tected Area (HPA). This area is often used by computer makers to hold diagnostic software, and/or a copy of the
originally provided operating system for recovery purposes. Another possible use is to hide the true capacity
of a very large disk from a BIOS/system that cannot normally cope with drives of that size (eg. most current
{2010} BIOSs cannot deal with drives larger than 2TB, so an HPA could be used to cause a 3TB drive to report it‐
self as a 2TB drive). To change the current max (VERY DANGEROUS, DATA LOSS IS EXTREMELY LIKELY), a new value
should be provided (in base10) immediately following the -N option. This value is specified as a count of sec‐
tors, rather than the "max sector address" of the drive. Drives have the concept of a temporary (volatile) set‐
ting 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 be‐
fore another permanent -N operation can succeed. Note that any attempt to set this value may fail if the disk
is being accessed by other software at the same time. This is because setting the value requires a pair of
back-to-back drive commands, but there is no way to prevent some other command from being inserted between them
by the kernel. So if it fails initially, just try again. Kernel support for -N is buggy for many adapter types
across many kernel versions, in that an incorrect (too small) max size value is sometimes reported. As of the
2.6.27 kernel, this does finally seem to be working on most hardware.
Bez toho "p" to je jen dočasné (do dalšího resetu zařízení) s tím "p" před číslem je ta změna permanentní. Parametr "-p" dělá přeprogramování IDE interface chipsetu pro specifický PIO mód, takže proto ta chyba.
PS: Pozor na tohle:
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.