Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently a buddy of mine has pointed out in his blog (in Russian) that hard drives that use the ext3 filesystem can not be spun down because of the need to frequently write data. According to him, it is caused by the way the ext3 filesystem is implemented.

Is it actually true? Isn't there some way to use hard drive spin-down function when there is no data written and read from the disk? And by that I mean not some one-time manual spin-down, but a constantly running power-saving application of some sort.

It may be worth noting that I'm using Ubuntu, but it may be not that relevant to the matter.

share|improve this question
The ext filesystem has been obsolete since 1993. All current systems use either ext3 or ext4 (or something entirely different), and the blog post is about ext3. – grawity Sep 5 '11 at 10:23
Also, I'm somewhat clueless about this kind of issues, but my laptop has ext4, btrfs and fat32 partitions, and automatic disk spindown is working fine with "laptop_mode". It somewhat depends on the mount options used, but ext3/4 with default settings certainly do not write continuously -- only when a file is changed, and even that gets cached for some time. – grawity Sep 5 '11 at 10:27
up vote 1 down vote accepted

Yes. While ext3 is a journalling filesystem, that just means that most logical writes will be broken down in a set of physical writes. it's a multiplier effect. Therefore, it trivially follows that if you're not writing anything at all, ext3 will not make up writes either. 0*2 is still 0.

However, there is some truth here. Ext3 journal writes are flushed to disk, to order writes. This stops intermediate caches from reordering writes in a way that would destroy the integrity, if the system were to crash in between. E.g. if ext3 demands that write #1 finished before write #2, it does so by telling the system to flush write #1 to physical disk. Obviously that means waking up the disk, bu then again: it happens only if there are actual writes to that disk. Ext3 just means it's woken up earlier and/or more often.

share|improve this answer

The most important reason you can't really spin down you main hard drive in linux is because /var/log is usually mounted on that same partition as everything else.

Crontab and just about every other server application you may be running will be hitting the logs very frequently. Go

sudo tail -f /var/logs/*

and notice that even if your computer is seemingly resting, it's still pretty verbose..

share|improve this answer
Eeehm, basically, what I´m saying is that it's got nothing to do with the file system of choice. =) – zoomix Sep 5 '11 at 13:58
So that means that hypothetically if I make my system completely idle without any hard drive access, the ext3 filesystem won't require any background disk operations? – Igor Zinov'yev Sep 5 '11 at 14:09
No, but an entirely idle linux will still write to that file, whatever your file system. – tobylane Sep 5 '11 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .