1

Somewhat relevant to this, but is there a way to check if an external disk is already currently spun down (i.e. in idle state)?

I'd like to check a remote disk over SSH, so listening to the disk in person is not possible.

Running sudo hdparm -C /dev/sdb shows this is not supported on Western Digital

/dev/sdb:
APT: USB ID = xxxxxx...
APT: Unsupported device
...
 drive state is:  unknown

Is there another tool that can do this on Ubuntu 20? Thanks

Update: I'm running Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-1015-raspi aarch64) on Raspberry Pi 4.

algalg
  • 161
  • 6

1 Answers1

1

As suggested by @waltinator, we can use smartctl as part of smartmontools:

sudo smartctl -n standby /dev/sdb

If the device is in standby, it should return exit code (2).

algalg
  • 161
  • 6