Replies: 4 comments 1 reply
-
Looks like you may already know this stuff, so apologies if I'm telling you things you already know. Not all drives support HPA or maybe DCO. In the case of hdparm and nwipe, both programs issue a ioctl command { 0x85, 0x08, 0x0e, 0x00, 0xc2, 0, 0x01, 0, 0, 0, 0, 0, 0, 0x40, 0xb1, 0 }; If the ioctl command returns an error the sense buffer will be read to determine what the error was. That's what is happening above. In the case of nwipe it not only checks DCO/HPA using low level commands like hdparm it also runs hdparm and looks at it's output and looks at the max disc size provided by libparted. It then makes an assessment based on these three results. It looks like nwipe comes to the same conclusion as hdparm, i.e the three question marks in [HS? ???]. i.e the drive is not responding to either HPA or DCO ATA commands. Running nwipe with the -V option you will see all the sense data. Regarding the max sectors 156301488/1(1?) returned by hdparm. The slash /1 means no valid data was returned. The hdparm code adds a 1 for some reason that I don't know (but suspect it's a bug), but the data returned is not valid. This could be caused by
So, regarding iffy firmware. Some drives, I don't remember which, won't respond to DCO HPA command requests if you just changed, or attempted to change the HPA value. You need to power cycle after every change. Some aren't so finicky. So assuming you are using a SATA interface and not raid or USB unless the interface supports full ATA pass through I would try seeing if the DCO can be reset, remembering to power cycle then try setting the HPA and power cycle and then check HPA status. So What does the DCO make of the hard disk size, find the line that starts Real max sectors: xxxx
If the above command returns SG_IO: bad/missing sense data then check you are connected to a proper SATA interface, not raid or USB. Reset the DCO
Power cycle the drive after making any change Check the HPA
If it now works, great ! if you still get SG_IO: bad/missing sense data try setting the HPA assuming you know what the max number of sectors should be for this drive. Reset HPA
If you are still getting SG_IO: bad/missing sense data errors, i would probably put it down to the model of drive, especially if you have lots of these drives and they all do the same thing. It would be nice if it could be confirmed by the manufacturers technical documentation if anybody knows whether Western Digital provide that. I can't find it. Can you list all the drives make/models that return SG_IO: bad/missing sense data or [HS? ???] status. It would be really nice to have a database of drives that don't work for DCO/HPA. Correct me if I'm wrong but I've got a feeling Seagate EXOS 10TB ST10000NM001G doesn't support HPA ?? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the information so far! I have all the drives hooked up directly to the mainboard with SATA. Set to AHCI in the BIOS. I get weird results with
Running Could this be related to the computer hardware I'm using? I'll try a different PC later to see if the results are the same. Yes, I would happily report all the drives I have that don't support DCO/HPA. |
Beta Was this translation helpful? Give feedback.
-
Just to clarify, not just a computer reboot but the drive needs to be powered down and up and not just go into standby either. Also I think I read somewhere Seagate have moved away from supporting HPA/DCO on the newer Enterprise drives.
I wonder if the firmware is different? Does smartctl -a show the firmware rev on these drives? |
Beta Was this translation helpful? Give feedback.
-
I turned off the power supply and held the power button for a couple of seconds until all lights turned off on the mainboard. Same results. Is that enough?
Yes, firmware version shows up, but I can't find two drives of the same model where one works and one doesn't. So I guess it doesn't matter.
Nothing changes, drives either work or don't, independent of the used SATA port. Also tried it on a different PC, same results. I tried running HDAT2 (v7.5) and it says there is no HPA on the drives I tested. When I unplug the power cable to the drives and plug it in again it also says there is no DCO... |
Beta Was this translation helpful? Give feedback.
-
I've got a lot of drives that report HS? ???. Running
hdparm -N /dev/sda
gives me this result:SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 00 21 04 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 01 21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
max sectors = 156301488/1(1?), HPA setting seems invalid (buggy kernel device driver?)
Affected drives are, for example:
Other drives work correctly, either reporting no HPA or successfully responding to changing sector size.
Also tried the same thing in Ubuntu 22.04.3 with the same result.
Using
rtcwake -s 5 -m mem
to make the drivesnot frozen
doesn't change anything.Does anyone have ideas what I could do?
Beta Was this translation helpful? Give feedback.
All reactions