safe way to standby sata hdd?
Phil Knirsch
pknirsch at redhat.com
Fri Dec 18 11:21:43 UTC 2009
On 12/17/2009 04:28 PM, Eric Sandeen wrote:
> Michał Piotrowski wrote:
>> 2009/12/16 Eric Sandeen<sandeen at redhat.com>:
>>> Michał Piotrowski wrote:
>>>> Hi,
>>>>
>>>> I've got a home database/symfony env/etc../file server. It's based on
>>>> Intel D945GCLF2D Atom board. I've got a two hard drives WD Green Power
>>>> connected through Sata. First drive has / and /home filesystem, second
>>>> has /home/samba4. On the first drive there are two directories
>>>> /home/samba2 and /home/samba3 where I'm mounting ecryptfs.
>>>> /home/samba4 is also crypted by default.
>>>>
>>>> I'm wondering if there is a safe way for such configuration to put
>>>> second harddrive into sleep (or both drives) after some idle time?
>>>> After some googling I've found some resolutions (haven't tested any of
>>>> these yet):
>>>> - hdparm -S
>>> I use this for the data drive on my mythbox. I just put this in my
>>> /etc/rc.local -
>>>
>>> # Spin down in 1 hours idle time
>>> hdparm -S 240 /dev/sda
>>
>> Have you used this for a disk with your rootfs?
>
> In the past I have, but lately getting the root to actually get idle
> is just about impossible it seems. I now have an ssd root and
> don't bother.
>
Hm, have you tried running the diskdevstat available in tuned-utils? It
should give you a pretty good idea whats causing the most wakeups.
And if you find any, could you please open bugzillas for them and add
them to the wakeup tracker for drivers:
https://bugzilla.redhat.com/show_bug.cgi?id=454582
Thanks!
Also, are you using a fresh install with relatime active for your system
partitions? I've personally seen quite a difference if relatime was
active as we do have occasional reads on idle systems that previously
caused metadata writes due to atime changes.
>>> (yeah, oddly, sda is not my boot drive) :)
>>>
>>>> - sdparm --set=STANDBY
>>>> - and laptop_tools
>>>>
>>>> I'm really not convinced that these methods are safe for my
>>>> configuration. Anyone have tried this before?
>>> Yep. What kind of safety are you worried about?
>>
>> I know that ecryptfs is just fs stack on top of my ext3 partition, but
>> still I care about data integrity.
>
> Ok but what does that have to do with spinning down a disk? :)
>
>>> It should just work,
>>> although you want a long enough idle time that you're not constantly
>>> spinning the disk up and down.
>>
>> Actually /home/samba4 is not mounted all the time - I'm umountig this
>> fs when I'm not using it. I'm wondering if there will be any problems
>> with data integrity when I forgot to umount ecryptfs and disk will be
>> stopped.
>
> I don't think so. Any access should just spin up the disk and carry on.
>
> -Eric
>
>>> Is there any nice user-friendly frontend to set this? It'd be nice
>>> to expose more power management choices to the users (for anything
>>> that can't be easily defaulted, that is).
>>>
>>> -Eric
>>
>> Regards,
>> Michal
>>
>
--
Philipp Knirsch | Tel.: +49-711-96437-470
Supervisor Core Services | Fax.: +49-711-96437-111
Red Hat GmbH | Email: Phil Knirsch <pknirsch at redhat.com>
Hauptstaetterstr. 58 | Web: http://www.redhat.com/
D-70178 Stuttgart, Germany
Motd: You're only jealous cos the little penguins are talking to me.
More information about the fedora-devel-list
mailing list