Linux – Which command to force a drive to spin up

hard-disklinuxpower-management

I've looked through the manual for hdparm, sdparm. I know there are arguments to spin down the drive, with -y and -Y. I also know there are arguments to control the power saving features, such as -S and -B. However what I want is to start the motor and spin up the drive.

sdparm

I see sdparm's manual page has load and start parameters. Can either of these be used? It seems more like something appropriate for a tape drive, or at beast an optical drive?

dd

dd if=/dev/hdX of=/dev/null count=512 seems the best answer according to What command do I use to spin up a "power up in standby" drive?
However, when this is already in the cache, then the drive will not spin up.

It seems strange there is no command to explicitly tell the device to start the motor/spin up.

What is the best way to spin up SATA HDDs in GNU/Linux?

Best Answer

Read from the raw disk device instead of the block device. This bypasses the kernel buffer cache and guarantees that the drive will spin up.

Related Question