Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to disable & enable HDD manually?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
double_crane
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2011
Posts: 85
Location: JiangSu,China

PostPosted: Sun Nov 17, 2013 2:49 am    Post subject: how to disable & enable HDD manually? Reply with quote

I use a SSD as system harddisk , and it's very quiet.
and a HDD to store large resources , when HDD is on ,it make noise,though not very loud.

but when at deep night , the noise HDD make makes me annoy

I notice use
Code:

hdparm -Y /dev/sdb

can make HDD off , no disk head rotate and so no noise.
but once there is some processor task access the HDD , it'll active automatically.

I want it like in windows,in windows ,there is a device manager ,and I can disable HDD there.
and it won't active automatically ,until I enable it in device manager manually again .

So,how to disable & enable HDD manually?
just how to enable HDD manually ,not automatically activate anytime I access it ?
Back to top
View user's profile Send private message
Maitreya
Apprentice
Apprentice


Joined: 11 Jan 2006
Posts: 188

PostPosted: Sun Nov 17, 2013 3:22 am    Post subject: Reply with quote

Well if you disable it under windows you can't access it anymore.
If that is ok why don't you unmount the disk so there is no disk access?
Back to top
View user's profile Send private message
chaseguard
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2004
Posts: 131

PostPosted: Sun Nov 17, 2013 5:35 am    Post subject: Reply with quote

You could make a cron job to unmount the disk and then run the hdparm command. Alternative to hdparm would be spindown which will automatically cause the disk to spindown after a an idle period you can set. I would go with the cron job.
Back to top
View user's profile Send private message
double_crane
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2011
Posts: 85
Location: JiangSu,China

PostPosted: Sun Nov 17, 2013 10:05 am    Post subject: Reply with quote

chaseguard wrote:
You could make a cron job to unmount the disk and then run the hdparm command. Alternative to hdparm would be spindown which will automatically cause the disk to spindown after a an idle period you can set. I would go with the cron job.



how to set idle period ?

how can I detect all the access to /dev/sdb , to count the no-acccess time since the last access?
Back to top
View user's profile Send private message
dlaor
n00b
n00b


Joined: 27 Jan 2008
Posts: 38

PostPosted: Sun Nov 17, 2013 10:14 am    Post subject: Reply with quote

You can use autofs to do this: it automatically mounts a partition when needed and, optionally, unmounts it after a specified time of inactivity.

See http://wiki.gentoo.org/wiki/AutoFS.

You can combine this with some hdparm setting that tells the drive to spin down automatically when it has not been used for some time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum