You are not logged in.
I added a USB hard drive to my system and have noticed that it appears not to be parking the heads on system shutdown; I can hear a brief scrape when the power is cut. The drive is encrypted, and I automount it at boot with crypttab and fstab entries. I shut down the system by issuing the poweroff command.
The Wiki recommends explicitly telling the system to shut down USB drives after unmounting them. I could certainly script unmounting, closing my LUKS container, shutting down the drive, and then powering off the system, but shouldn't I be concerned that systemd does not appear to already be handling this for me? What's more, if my USB drive isn't properly being powered down, can I expect that my main SSD connected via SATA is?
Last edited by zcal (2020-12-20 05:39:46)
Offline
After doing some scripting to shut down the drive prior to poweroff, it appears that the issue is likely with the time it takes the drive to realize it's been cut loose from the system and park its heads. I've had to implement a 20 second sleep between telling the system to delete the drive and poweroff. Anything less and I still get the scrape sound.
Offline
I am skeptical that it truly the heads scraping across the disk. I cannot think of any drives built in this century that do not automatically park their hands at removal of power.
https://superuser.com/questions/1319383 … -shut-down
https://en.wikipedia.org/wiki/Hard_disk_drive_failure
.
But, you probably do want to ensure the volume is dismounted and the drive sync'ed (see man sync). Some old timers will run it a few times, just be to sure https://utcc.utoronto.ca/~cks/space/blo … gendOfSync
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
The emergency retract is probably just less controlled and smooth as a regular one (but unlikely to crash on the discs - the parking is the default position and requries power to be pushed out)
Try to umount the drive (what should™ sync it implicitly) and the "hdparm -y /dev/sdX" to move it to standby - currently you're probably relying on the standby timeout.
Offline
I did consider that the sound could be the drive auto-parking the heads at power loss. If it's that, then it's noisier than I expected so it's alarming.
The suggested hdparm command yields the following:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
This points to firmware issues and specifically mentions Seagate drives, which is what I have.
A 20 second delay on shutdown isn't the worst, so I'm inclined to just keep my script as-is. If it starts to bug me anymore I'll probably bite the bullet and buy an SSD to replace it.
Offline
Did you see the comment about the quirk situation?
Offline
I didn't. Glossed over it.
I've disabled quirks for the drive and now it's accepting the hdparm standby command. Much better. Thanks for pointing that out!
Offline