2002-06-24 20:06:39

by Miles Lane

[permalink] [raw]
Subject: Automatically mount or remount EXT3 partitions with EXT2 when a laptop is powered by a battery?

Hi,

Is there any possibility we could:

1) Add support to the boot/mounting process
so that, if a machine is being powered by
battery, EXT3 partitions are mounted with
EXT2, instead?

2) While the machine is running, notice when the
power source switches between AC and battery
or vice versa and remount partitions EXT3
partitions to use EXT2 whenever a battery is
being used?

This could save laptop users a lot of power,
while keeping the benefits of EXT3 when AC
power is available.

I know that this can be accomplished with more
direct user intervention, but I am hoping a more
general and transparent solution can be created.

Miles


2002-06-24 20:25:00

by Andreas Dilger

[permalink] [raw]
Subject: Re: Automatically mount or remount EXT3 partitions with EXT2 when a laptop is powered by a battery?

On Jun 24, 2002 13:02 -0700, Miles Lane wrote:
> 1) Add support to the boot/mounting process
> so that, if a machine is being powered by
> battery, EXT3 partitions are mounted with
> EXT2, instead?

Impossible right now. While the on-disk format is the same, the
ext2 and ext3 drivers are totally different.

It's like asking if you can switch between IDE and SCSI drivers
automatically for a disk when you go on battery.

That said, it would be possible to update the ext3 code to allow it
to mount a filesystem without a journal by updating the journal
wrappers in include/linux/ext3_jbd.h.

Even so, the reasoning you give is a bad one - you are far safer
with ext3 on your laptop when it is running out of batteries,
because you are likely to run out of battery without unmounting
the filesystem cleanly, and that's just when you want ext3.

You should just change the flush parameters to be longer, or
figure out exactly why ext3 is writing stuff to disk when there
is no real I/O happening.

Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

2002-06-24 20:24:00

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Automatically mount or remount EXT3 partitions with EXT2 when a laptop is powered by a battery?

On 24 Jun 2002, Miles Lane wrote:

> Hi,
>
> Is there any possibility we could:
>
> 1) Add support to the boot/mounting process
> so that, if a machine is being powered by
> battery, EXT3 partitions are mounted with
> EXT2, instead?
>
> 2) While the machine is running, notice when the
> power source switches between AC and battery
> or vice versa and remount partitions EXT3
> partitions to use EXT2 whenever a battery is
> being used?
>
> This could save laptop users a lot of power,
> while keeping the benefits of EXT3 when AC
> power is available.
>
> I know that this can be accomplished with more
> direct user intervention, but I am hoping a more
> general and transparent solution can be created.
>
> Miles
>

What does ext2 do for batteries that ext3 doesn't?
Are they compatible?

>From what I've observed, ext3 has nothing to do with
battery power. It can just handle larger media.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

Windows-2000/Professional isn't.