2

I have an very old PC (Dell GX280) with 3 external USB drives. Two of the them had external 12V power supplies that annoyed me, so I got rid of them and am now powering them directly from the ATX power supply. Everything works properly, no brown outs, instability or other symptoms of lack of power.

But after all of this, I'm still afraid of the shut down procedure. When the Linux shuts down, it unmounts the devices and turns off the PSU moments later - but the hard drives were not designed for this - they are designed to have an always on 12V external power, not tied to the power of the computer. How can I know if they're making some more cleanup procedures after being unmounted.

How can I be sure that the drive is really ready to be powered down and only then power down the machine?

Drives: Seagate Backup Plus 2TB (Ext4) and Seagate Expansion 2TB (BTRFS). System: current Arch Linux 32 bit

1

How can I be sure that the drive is really ready to be powered down and only then power down the machine?

You really 100% can't know what the firmware on the drive is doing. I would think and hope that any cache on a hard disk controller board is mostly for reads, and is write-through, and that drives with problems with writes being lost during power off would become known in the community. You probably don't have anything to worry about. But it is true that you don't know for sure.

If you are really worried about this:

  • Use journaled file systems on these disks.

  • Test your disks to see if this is actually an issue.

  • Write your own shutdown script that quiesces your disks, waits 20 seconds (should be long enough for any cache to be written), then halts the system.

  • Journaled: of course I'm using journaled, it would be hard not to these days. Tests: any idea on how I can reliably test this situation? Im thinking of a dd (few hundered megs to the drive); shutdown and then check if it's there. Shutdown script: had the same idea, but wasn't sure of the needed delay. – Krzysztof Bociurko May 11 '17 at 10:13
  • Actually using unjournaled is as easy as an mke2fs command (not mkfs.ext4). Your testing methodology sounds good. – LawrenceC May 11 '17 at 12:36
3

Once they are unmounted they do not do anything further. The external power supply is not there to keep the drives spinning 24/7, it's designed to provide enough power for the drives when they need it as USB does not provide enough power for 3.5" disks.

Disk heads will park themselves when power is lost. (And the is is done with flushing data once umount returns)

  • I know the external power is not for constant spinning, but the drive manufacturer can persume that due to the external powering, the drives will have at least a few more seconds of power from the 12V than from USB. This gives some time that they might have used - and I want to make sure they haven't. I need to be sure that unmounting the drives is full - I know that with the unmount the writes from the OS are over, but what about internal drive caches - how can I be sure that all has been written? There is also the sync syscall, but is it trustworthy with this setup? – Krzysztof Bociurko May 4 '17 at 22:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.