Re: stagger forced fsck on reboot

2006-06-27 Thread Wouter Verhelst
On Tue, Jun 27, 2006 at 07:10:07PM +1000, Drew Parsons wrote:
> On Tue, 2006-06-27 at 09:04 +0200, Wouter Verhelst wrote:
> > However, what I'm saying is that such an event is extremely rare on
> > ext3, since a journal replay can, IME, deal with most filesystem
> > inconsistencies. The chance of a forced fsck occurring on ext3 due to
> > inconsistencies, and a resulting synchronisation of the staggered mount
> > count is therefore negligable.
> > 
> 
> OK, I see what you mean now.  You're saying that the possibility of
> subverting the staggered count isn't an extremely serious problem since
> it's isn't all that likely to occur, not automatically anyway.

Right.

> However I'm not sure it's negligable.
> 
> For instance a laptop owner may have had such a bad crash that s/he
> wants to manually force a full fsck on all partitions, and let the
> system continue with running its own checks automatically after that as
> normal.  But doing this will synchronise the counts, bringing that
> system back to the inconvenient scenario which we've been discussing.

Yes; but then again, one could wonder whether someone who knows the
system well enough to be able to bring their system into single-user
mode, umount various file systems, fsck them, remount them (if
necessary), etc, is not knowledgeable enough with the system to also be
able to figure out how to manually set those mount counts.

In other words, I think you should either optimize for novice users or
optimize for advanced users, but not for a mixture of the two :-)

That being said, if you still disagree, there's not much that can be
said anymore. I think we both understand eachother's points, but have
different opinions -- which is not really a problem.

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-27 Thread Drew Parsons
On Tue, 2006-06-27 at 09:04 +0200, Wouter Verhelst wrote:
> On Tue, Jun 27, 2006 at 11:39:22AM +1000, Drew Parsons wrote:
> > On Fri, 2006-06-23 at 17:18 +0200, Wouter Verhelst wrote:
> > > I fail to see why this
> > > would be a problem or is, indeed, relevant.
> > 
> > I'm sorry, Wouter, it's not clear to me that you correctly read the
> > problem I was describing.
> 
> Well, I did. What you meant is that staggering the counter is only going
> to work until the first forced fsck done on all filesystems, since at
> that time, they're all back in sync again.
> 
> However, what I'm saying is that such an event is extremely rare on
> ext3, since a journal replay can, IME, deal with most filesystem
> inconsistencies. The chance of a forced fsck occurring on ext3 due to
> inconsistencies, and a resulting synchronisation of the staggered mount
> count is therefore negligable.
> 

OK, I see what you mean now.  You're saying that the possibility of
subverting the staggered count isn't an extremely serious problem since
it's isn't all that likely to occur, not automatically anyway.  However
I'm not sure it's negligable.

For instance a laptop owner may have had such a bad crash that s/he
wants to manually force a full fsck on all partitions, and let the
system continue with running its own checks automatically after that as
normal.  But doing this will synchronise the counts, bringing that
system back to the inconvenient scenario which we've been discussing.
Of course h/she could manually reset the counts at the same time as
manually running the full fscks, but the whole point here is too make
things just a little simpler for them so they don't have to make extra
manual adjustments like that.

Of course once someone presents an actual patch to implement all this,
it should be simple enough to switch between either of the two methods,
staggering the max count or staggering the initial count :)   

Nevertheless I think I'd be more comfortable staggering the max mount
parameter rather than the accumulated mount count. :)

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-27 Thread Wouter Verhelst
On Tue, Jun 27, 2006 at 11:39:22AM +1000, Drew Parsons wrote:
> On Fri, 2006-06-23 at 17:18 +0200, Wouter Verhelst wrote:
> > I fail to see why this
> > would be a problem or is, indeed, relevant.
> 
> I'm sorry, Wouter, it's not clear to me that you correctly read the
> problem I was describing.

Well, I did. What you meant is that staggering the counter is only going
to work until the first forced fsck done on all filesystems, since at
that time, they're all back in sync again.

However, what I'm saying is that such an event is extremely rare on
ext3, since a journal replay can, IME, deal with most filesystem
inconsistencies. The chance of a forced fsck occurring on ext3 due to
inconsistencies, and a resulting synchronisation of the staggered mount
count is therefore negligable.

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-26 Thread Drew Parsons
On Fri, 2006-06-23 at 17:18 +0200, Wouter Verhelst wrote:
> I fail to see why this
> would be a problem or is, indeed, relevant.

I'm sorry, Wouter, it's not clear to me that you correctly read the
problem I was describing.

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-23 Thread Wouter Verhelst
On Fri, Jun 23, 2006 at 11:50:55PM +1000, Drew Parsons wrote:
> remount setting that would want to be staggered.  Staggering the counter
> would in a sense only work the first time round.

More precise, it would work until the first unclean shutdown and
subsequent forced fsck.

However, seen as though forced fsck after unclean umount on ext3 only
occurs rarely thanks to ext3's journaling features (and seen that a
journal replay does not reset the mount counter), I fail to see why this
would be a problem or is, indeed, relevant.

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-23 Thread Drew Parsons
On Fri, 2006-06-23 at 13:42 +0200, Wouter Verhelst wrote:
> On Fri, Jun 23, 2006 at 11:40:17AM +1000, Drew Parsons wrote:
> > Robert wrote:
> > > 
> > > as far as i know it's also possible to set the counter to a specific
> > > value, which might be better. so make them all be checked after 20
> > > maounts, but set the counters to 0, 1, 2, 3 and so on after the
> > > isntallation.
> > 
> > Yeah, that would probably be nicer aesthetically.  But we'd want to
> > remember on the other hand that its exactly the same as using
> > 20,19,18,17 with counters set to 0.
> 
> No, that's not true. The first will mean they will always stagger at
> one; the second will mean they will stagger at one the first time, then
> at two, then at three, and so on, until they wrap around and eventually
> end you up with a case where they do *not* stagger anymore.

Yes, you're right. I only thought of that afterwards.  It is the max
remount setting that would want to be staggered.  Staggering the counter
would in a sense only work the first time round.

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-23 Thread Drew Parsons
On Fri, 2006-06-23 at 13:39 +0200, Wouter Verhelst wrote:
> On Fri, Jun 23, 2006 at 11:54:24AM +1000, Drew Parsons wrote:
> > You're taking it too disastrously.  The problem I'm trying to solve is
> > when the max mount count is reached, this is the case in which the
> > forced fscks becomes annoying.  Whether the forced fsck is done this
> > time around or only on the next reboot instead is not going to make
> > that much difference to the file system integrity. 
> 
> Hm.
> 
> You are aware that e2fsck has a feature since a while back which will
> make the forced count or time be doubled in case you're running on
> battery?
> 

Ah no, I wasn't aware of that.  But I'm not referring to battery life
anyway, just the length of time of waiting for all partitions to fsck at
the same time (even if I'm plugged in to AC power).  I only refer to
laptops insofar as they are less stable than desktops or servers, so the
remounting occurs more frequently with them.   The same problem that I'm
addressing exists for desktops, it's just not quite as pressing with
them.

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-23 Thread Wouter Verhelst
On Fri, Jun 23, 2006 at 11:40:17AM +1000, Drew Parsons wrote:
> Robert wrote:
> > On Mon, Jun 19, 2006 at 04:40:05PM +1000, Drew Parsons wrote:
> > > The inconvenience could be ameliorated if the force-fsck mount counter
> > > could be staggered for each partition.  For instance, the first
> > > partition on every 20 mounts, the second on every 21, and so on.  Then
> > > on a given reboot, on average you'd only have to put up with one forced
> > > fsck, not all of them together.
> > 
> > as far as i know it's also possible to set the counter to a specific
> > value, which might be better. so make them all be checked after 20
> > maounts, but set the counters to 0, 1, 2, 3 and so on after the
> > isntallation.
> 
> Yeah, that would probably be nicer aesthetically.  But we'd want to
> remember on the other hand that its exactly the same as using
> 20,19,18,17 with counters set to 0.

No, that's not true. The first will mean they will always stagger at
one; the second will mean they will stagger at one the first time, then
at two, then at three, and so on, until they wrap around and eventually
end you up with a case where they do *not* stagger anymore.

> Joey Hess wrote:
> 
> > I think it's a great idea, especially if there's code written to do
> > it.
> > :-)
> 
> There's always that ;)
> 
> There seems to be mixed enthusiasm for the idea, but I'm glad some
> people think it's a good idea.  I'm not familiar with the d-i code so I
> don't know how long it'd take me to come up with a patch myself.  Anyone
> else who likes the idea and has a spare evening. feel free to get to it
> first :)
> 
> Drew
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Re: stagger forced fsck on reboot

2006-06-23 Thread Wouter Verhelst
On Fri, Jun 23, 2006 at 11:54:24AM +1000, Drew Parsons wrote:
> You're taking it too disastrously.  The problem I'm trying to solve is
> when the max mount count is reached, this is the case in which the
> forced fscks becomes annoying.  Whether the forced fsck is done this
> time around or only on the next reboot instead is not going to make
> that much difference to the file system integrity. 

Hm.

You are aware that e2fsck has a feature since a while back which will
make the forced count or time be doubled in case you're running on
battery?

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-22 Thread Christian Perrier
> There seems to be mixed enthusiasm for the idea, but I'm glad some
> people think it's a good idea.  I'm not familiar with the d-i code so I


I also support that idea. In the past, before using XFS, I've been hit
by this and my usual answer to the "general fsck" problem is "fuck,
I'm in a hurry and let's hit Ctrl-C to stop that damn fsck".

So, the solution to set the counter incrementally on all partitions is
a very good idea for me.


BTW: I also think that 30 is a very low number. I usually raise it a
bit on the machines where I still use ext3




signature.asc
Description: Digital signature


Re: Re: stagger forced fsck on reboot

2006-06-22 Thread Drew Parsons
Wouter wrote:
> > The problem then is when the partitions hit the forced-fsck mark, with
> > the default settings they all have to go through their fsck at the same
> > time. It takes time, and when all you had intended to do was to resume
> > out of suspend to quickly check some data, but came up against one of
> > these laptop crashes, it can be quite annoying.
> 
> If that's what you're trying to do, then staggering the forced fsck timings
> isn't going to help you at all.
> 
> fsck on boot can occur in two occasions: either it needs to be done
> because you hit the max mount count or max unchecked timeout, or it
> needs to be done because you previously umounted uncleanly and it can't
> be fixed by replaying the ext3 journal (either because it got corrupted,
> or because you're running ext2 and there is no journal).

You're taking it too disastrously.  The problem I'm trying to solve is
when the max mount count is reached, this is the case in which the
forced fscks becomes annoying.  Whether the forced fsck is done this
time around or only on the next reboot instead is not going to make
that much difference to the file system integrity. 

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-22 Thread Drew Parsons
Robert wrote:
> On Mon, Jun 19, 2006 at 04:40:05PM +1000, Drew Parsons wrote:
> > The inconvenience could be ameliorated if the force-fsck mount counter
> > could be staggered for each partition.  For instance, the first
> > partition on every 20 mounts, the second on every 21, and so on.  Then
> > on a given reboot, on average you'd only have to put up with one forced
> > fsck, not all of them together.
> 
> as far as i know it's also possible to set the counter to a specific
> value, which might be better. so make them all be checked after 20
> maounts, but set the counters to 0, 1, 2, 3 and so on after the
> isntallation.

Yeah, that would probably be nicer aesthetically.  But we'd want to
remember on the other hand that its exactly the same as using
20,19,18,17 with counters set to 0.

Joey Hess wrote:

> I think it's a great idea, especially if there's code written to do
> it.
> :-)

There's always that ;)

There seems to be mixed enthusiasm for the idea, but I'm glad some
people think it's a good idea.  I'm not familiar with the d-i code so I
don't know how long it'd take me to come up with a patch myself.  Anyone
else who likes the idea and has a spare evening. feel free to get to it
first :)

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-20 Thread Robert Lemmen
On Mon, Jun 19, 2006 at 04:40:05PM +1000, Drew Parsons wrote:
> The inconvenience could be ameliorated if the force-fsck mount counter
> could be staggered for each partition.  For instance, the first
> partition on every 20 mounts, the second on every 21, and so on.  Then
> on a given reboot, on average you'd only have to put up with one forced
> fsck, not all of them together.

as far as i know it's also possible to set the counter to a specific
value, which might be better. so make them all be checked after 20
maounts, but set the counters to 0, 1, 2, 3 and so on after the
isntallation.

cu  robert

-- 
Robert Lemmen   http://www.semistable.com 


signature.asc
Description: Digital signature


Re: stagger forced fsck on reboot

2006-06-19 Thread Joey Hess
Drew Parsons wrote:
> The inconvenience could be ameliorated if the force-fsck mount counter
> could be staggered for each partition.  For instance, the first
> partition on every 20 mounts, the second on every 21, and so on.  Then
> on a given reboot, on average you'd only have to put up with one forced
> fsck, not all of them together.
> 
> Has this been discussed before?  Is it worth considering?

I think it's a great idea, especially if there's code written to do it.
:-)

-- 
see shy jo


signature.asc
Description: Digital signature


Re: stagger forced fsck on reboot

2006-06-19 Thread Wouter Verhelst
On Mon, Jun 19, 2006 at 04:40:05PM +1000, Drew Parsons wrote:
> Hi debian-installer people,
> 
> Partitions have a counter so that an fsck is forced on them at reboot
> after they have have mounted as certain number of times (I think it's
> after 20 or 30 mounts).
> 
> The last time I checked, on a default installation with multiple
> partition this forced fsck occured after the same number of mounts for
> each partition.  Personally I find this quite inconvenient for laptops.
> In my experience laptops are still relatively unstable.  The battery may
> run out,  after S3 sleep (suspend-to-ram) it may not always resume
> correctly (there have particularly been problems here with DRI on the
> X11 video driver my laptop uses).  So for a variety of reasons a laptop
> reboots and remounts partitions much more frequently than a desktop.
> 
> The problem then is when the partitions hit the forced-fsck mark, with
> the default settings they all have to go through their fsck at the same
> time. It takes time, and when all you had intended to do was to resume
> out of suspend to quickly check some data, but came up against one of
> these laptop crashes, it can be quite annoying.

If that's what you're trying to do, then staggering the forced fsck timings
isn't going to help you at all.

fsck on boot can occur in two occasions: either it needs to be done
because you hit the max mount count or max unchecked timeout, or it
needs to be done because you previously umounted uncleanly and it can't
be fixed by replaying the ext3 journal (either because it got corrupted,
or because you're running ext2 and there is no journal).

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-19 Thread Geert Stappers
On Mon, Jun 19, 2006 at 06:10:04PM +1000, Drew Parsons wrote:
> On Mon, 2006-06-19 at 09:57 +0200, Frans Pop wrote:
> > On Monday 19 June 2006 08:40, Drew Parsons wrote:
> > > [ change the force-fsck mount behaviour ]
> > 
> > My first reaction is that this falls under the header of "tuning to be 
> > done by the system's administrator based on personal preference".
> 
> I think I'd want to make a "but think of the children" response to that.
> Of course the sysadmin can change it afterwards to whatever they want
> to.  But what sort of experience do we want to provide for our less
> advanced users?  It's not reasonable to ask them to change the defaults
> for something like this.  

IMNSHO is the way to go, is to educate users
We can learn laptop-users to do 

shutdown -Fr   # Force fsck and reboot

to reset the mount counters. They will find a way to schedule it.
Example given: force fsck while packing for a bussness trip or
each second monday during lunch.

> So the question comes down to "what set of defaults provides the nicest
> experience for less confident users?"  Will it be nicer for them if we
> provide an arrangement that can occasionally reduce their reboot time?

I think people should think for themselfs.
And forsee that staggered mount counters will hinder
forced file systems checks.

Cheers
Geert Stappers


signature.asc
Description: Digital signature


Re: stagger forced fsck on reboot

2006-06-19 Thread Frans Pop
On Monday 19 June 2006 10:10, Drew Parsons wrote:
> So the question comes down to "what set of defaults provides the nicest
> experience for less confident users?"  Will it be nicer for them if we
> provide an arrangement that can occasionally reduce their reboot time?

Inexperienced users will probably use a "all files in one partition" 
setup, which makes the issue irrelevant. This is what d-i advises during 
automatic partitioning.

Users selecting other schemes can IMHO be expected to be able to change 
these settings. Also, there is no urgency in changing these settings: it 
can be done at any time at will.

The minor advantages for me do not weigh up against the added code needed 
in the installer especially as there are no "good for all settings". Some 
may want more frequent checks, others less frequent.

Of course, that's only my opinion.
The basic rule in the installer is "unless there are strong reasons for 
something else, stick to the defaults". This is the principle of the 
least surprise.

Cheers,
FJP


pgpfijsIxZLo8.pgp
Description: PGP signature


Re: stagger forced fsck on reboot

2006-06-19 Thread Drew Parsons
On Mon, 2006-06-19 at 09:57 +0200, Frans Pop wrote:
> On Monday 19 June 2006 08:40, Drew Parsons wrote:
> > The inconvenience could be ameliorated if the force-fsck mount counter
> > could be staggered for each partition.  For instance, the first
> > partition on every 20 mounts, the second on every 21, and so on.  Then
> > on a given reboot, on average you'd only have to put up with one forced
> > fsck, not all of them together.
> >
> > Has this been discussed before?  Is it worth considering?
> 
> My first reaction is that this falls under the header of "tuning to be 
> done by the system's administrator based on personal preference".

I think I'd want to make a "but think of the children" response to that.
Of course the sysadmin can change it afterwards to whatever they want
to.  But what sort of experience do we want to provide for our less
advanced users?  It's not reasonable to ask them to change the defaults
for something like this.  

So the question comes down to "what set of defaults provides the nicest
experience for less confident users?"  Will it be nicer for them if we
provide an arrangement that can occasionally reduce their reboot time?

Drew


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: stagger forced fsck on reboot

2006-06-19 Thread Frans Pop
On Monday 19 June 2006 08:40, Drew Parsons wrote:
> The inconvenience could be ameliorated if the force-fsck mount counter
> could be staggered for each partition.  For instance, the first
> partition on every 20 mounts, the second on every 21, and so on.  Then
> on a given reboot, on average you'd only have to put up with one forced
> fsck, not all of them together.
>
> Has this been discussed before?  Is it worth considering?

My first reaction is that this falls under the header of "tuning to be 
done by the system's administrator based on personal preference".

Cheers,
FJP


pgp8Yv0qgXGih.pgp
Description: PGP signature