25

What *nix command would cause the hard drive arm to rapidly switch between the centre and the edge of the platter?

In theory it should soon cause a mechanical failure. It is for an experiment with old hard drives.

  • 4
    You should contact this guy, and ask him how he does the "hd arm percussion" trick :) - youtube.com/watch?v=Oym7B7YidKs – user34720 Feb 13 '18 at 16:45
  • 1
    It's asking for a software command to cause a hardware action. Sounds like on topic to me. You could also ask for an application at softwarerecs.stackexchange.com – Mawg Feb 14 '18 at 12:28
25

hdparm --read-sector N will issue a low-level read of sector N bypassing the block layer abstraction. Use -I to get the device's number of sectors.

  • 2
    Thank you. Note that in order to avoid caching, I will probably have to use the -F Flush the on-drive write cache and the --repair-sector option. – user82160 Feb 13 '18 at 16:26
  • It will use logical coordinates. See h22 answer. – talex Feb 14 '18 at 9:55
9

Your hard drive must be really old for this to work as expected. Drives initially allowed to specify the physical track (cylinder), real physical head and sector to access the data (initial concept of the CHS standard), but any newer drives (even ancient as in terms of today) use completely fictional geometry (and have spare blocks, to auto-remap blocks that the drive's logic thinks are getting wonky). Further, the precise internal mapping between real and representational geometries may change at any time (there is a SMART attribute to see these events).

Hence I think there is no command "to force hard drive arm to move to a specific position on the platter" in these days, unless it is possible to modify the firmware first. Even moving to "the last block" isn't really the last block, because of those spares.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy