power management and ext3 - mount as ext2?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 22, 2002 at 11:21:27AM +1200, Bret Comstock Waldow wrote:
> 
> Newbie question here.  I've read some about how you can't power down a
> disk under ext3 because of the journaling writes.  I also know I can
> mount my ext3 partitions as ext2.

That's strictly speaking not true.  The "noflushd" daemon, which
stalls writes to the disk in an effort to allow the disk to spin down,
is ineffectual under ext3 --- that's true.  And yes, it's because of
the journalling writes.

On the other hand, it certainly is possible to make various changes to
your system configuration to avoid writing to the disk in the first
place.  Mounting your filesystems with noatime is a good start; this
prevents read accesses to files from causing the last accessed time
from being updated, which is a cause of many disk writes.  

Another good thing to do is to make sure syslog isn't writing a lot of
extraneous log messages to your log files.

If you do both of these things, it's not that hard to make sure that
on an idle system, the disks don't spin up, even when using ext3.

> What about mounting the partitions as ext2 while mobile on batteries? 
> The hard disk would spin down when it wasn't in use (if noflush, etc.
> has been configured).  But what about data integrity when remounting as
> ext3 later?

There's no problem mounting the partitions as ext2, and then
remounting them as ext3 later.  The only problem with this is a
convenience factor.  You can't remount a filesystem to change its
filesystem type.  You have to explicitly unmount the filesystem as
ext2, and then remount it as ext3 --- and this won't work for the root
filesystem.  

You could edit /etc/fstab, or copy in an alternative /etc/fstab which
used ext2 instead of ext3, and then reboot your system, but it's
rather annoying to have to reboot when you need to go mobile on
batteries.  (I like to be able to just pull the AC adaptor, suspend my
laptop, put it into my knapsack, and then be able to pull it out and
use it on batteries as necessary.  Needing to reboot is unfortunate.)

I haven't tried RH 7.3 on a laptop, but using debian, simply mounting
the filesystems with the noatime option kept the disks spun down most
of the time.  It was only every 10-15 minutes that the disks would
spin up briefly, due to syslog messages.  (cron would run some command
which would cause some number of log messages, and this would wake up
the disk.  Most of the time, these log messages weren't interesting
anyway, so I just modify my syslog.conf file to keep those messages
from getting written to the log file.)

						- Ted





[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux