How to turn off a USB disk via hdparm?


8 posts
by Onira » Mon Dec 24, 2012 6:24 pm
can I turn off a HDD connected via USB using hdparm or any other tool?
its sometimes bit loud at night
Cogito ergo sum
User avatar
Posts: 168
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland
by Mobius » Mon Dec 24, 2012 7:45 pm
Can't you just unplug it from the USB at night?
Posts: 238
Joined: Thu Aug 30, 2012 1:07 am
Location: San Angelo, Texas USA
by Onira » Mon Dec 24, 2012 8:25 pm
it's not a solution
Cogito ergo sum
User avatar
Posts: 168
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland
by efflandt » Tue Dec 25, 2012 12:53 am
Did you read man hdparm in a terminal? You probably want little -y. Not sure if it would wake up on USB if you use capital -Y.
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA
by Onira » Tue Dec 25, 2012 8:13 am
so
Code: Select all
$ hdparm -y
?
do I have to use sudo?

I want to do it via ssh.
Cogito ergo sum
User avatar
Posts: 168
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland
by jheaton5 » Wed Dec 26, 2012 12:16 am
You need to specify the device your are putting to sleep. The command is
Code: Select all
hdprm -y /dev/sdx
User avatar
Posts: 23
Joined: Mon Dec 24, 2012 3:33 pm
by efflandt » Wed Dec 26, 2012 5:21 am
Actually: sudo hdparm -y /dev/sda
assuming 1st USB drive
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA
by Onira » Wed Dec 26, 2012 10:24 am
yes, only 1 USB drive is connected (the other USB port is taken by wifi adapter ;) )
so
Code: Select all
$ sudo hdparm -y /dev/sda

thank You very much :)
Cogito ergo sum
User avatar
Posts: 168
Joined: Tue Oct 02, 2012 6:24 pm
Location: Poland