Discussion:
How to set USB-HDD to sleep mode?
(too old to reply)
Till Wimmer
2008-03-07 14:45:04 UTC
Permalink
Hi,

i'd like to set my external USB harrdrive to sleep mode because i need it only once a day (backup).
I tried with hdparm:

hdparm -Y /dev/sdb
/dev/sdb:
issuing sleep command
HDIO_DRIVE_CMD(sleep) failed: Invalid argument

same result with hdparm -y, -S 10

Then i tried
sdparm --command=stop /dev/sdb1

but nothing happens.

Any hint on how to do this?

lsusb shows me this:

Bus 001 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter

Thanks in advance,
Till
Sinister Midget
2008-03-07 17:22:53 UTC
Permalink
Post by Till Wimmer
Hi,
i'd like to set my external USB harrdrive to sleep mode because i need it only once a day (backup).
hdparm -Y /dev/sdb
issuing sleep command
HDIO_DRIVE_CMD(sleep) failed: Invalid argument
same result with hdparm -y, -S 10
Then i tried
sdparm --command=stop /dev/sdb1
but nothing happens.
Any hint on how to do this?
Bus 001 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter
Thanks in advance,
Till
umount /dev/sdb1

It won't get polled or anything else if it isn't mounted.
--
Don't you feel more like you do now than you did when you came in?
Till Wimmer
2008-03-17 11:44:26 UTC
Permalink
Post by Sinister Midget
Post by Till Wimmer
Hi,
i'd like to set my external USB harrdrive to sleep mode because i need it only once a day (backup).
hdparm -Y /dev/sdb
issuing sleep command
HDIO_DRIVE_CMD(sleep) failed: Invalid argument
same result with hdparm -y, -S 10
Then i tried
sdparm --command=stop /dev/sdb1
That's wrong... I of course did a "sdparm --command=stop /dev/sdb" ... (not ".../sdb1")
Post by Sinister Midget
Post by Till Wimmer
but nothing happens.
Any hint on how to do this?
Bus 001 Device 005: ID 04b4:6830 Cypress Semiconductor Corp. USB-2.0 IDE Adapter
Thanks in advance,
Till
umount /dev/sdb1
It won't get polled or anything else if it isn't mounted.
sdb is not mounted when i try to send it to sleep.

Till
Scott Alfter
2008-03-17 16:55:05 UTC
Permalink
Post by Till Wimmer
Hi,
i'd like to set my external USB harrdrive to sleep mode because i need
it only once a day (backup).
hdparm -Y /dev/sdb
issuing sleep command
HDIO_DRIVE_CMD(sleep) failed: Invalid argument
same result with hdparm -y, -S 10
Then i tried
sdparm --command=stop /dev/sdb1
but nothing happens.
Any hint on how to do this?
The only way I was able to figure out to get this working was to use a cron
job to periodically spin down (or try to spin down) the drive:

-----------------------------------start-----------------------------------
#!/bin/sh

# needs sg3_utils 1.23 or later

source /etc/profile

if [ \! "`fuser -c /mnt/music 2>/dev/null`" ]
then
sg_start --stop /dev/disk/by-label/music
fi
------------------------------------end------------------------------------

Change /dev/disk/by-label/music and /mnt/music to appropriate values for
your system, and then set it up to run every 10 minutes or so. It checks
for open files on the drive; if there are none, it sends a spindown request
to the drive. sg_start (from sg3_utils) is the only tool I've found that'll
work with USB drives.

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( http://alfter.us/ Top-posting!
\_^_/ rm -rf /bin/laden >What's the most annoying thing on Usenet?
Continue reading on narkive:
Loading...