Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Fri, 2008-06-13 at 18:32 +0200, Johannes Wiedersich wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 2008-06-13 17:11, Kamaraju S Kusumanchi wrote:
> > David wrote:
> > 
> >> Every X days or Y reboots, Linux (on my home PC, which I boot & shut
> >> down 2x each day) wants to scan partitions for errors at startup.
> >> While this is a bit annoying (can't use the PC for 10-20 minutes), I
> >> usually let it finish and read a book while waiting.
> 
> [...]
> 
> > Now a days, the only time I do a complete reboot of my laptop is when I had
> > upgraded the kernel (due to a security upgrade).
> 
> In other words, you usually bypass fsck'ing. With respect to fsck it is
> about the same as setting the maximum mount count to something close to
> infinity.

Since you're not unmounting anything prior to hibernation (everything's
still mounted when you hibernate), it's not like you're setting the
mount/days-since-last-fsck count to something near infinity.  It's more
like you have insanely high uptime.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Fri, 2008-06-13 at 17:02 +0200, Johannes Wiedersich wrote:
> In my experience *any* computer will be in some kind of standby mode as
> long as there is no physical interruption to the power.

What about machines in PC, XT or AT style cases?  This
always-on-standby, soft-power-button stuff only came around with the ATX
form factors.

> Some power
> supplies don't have a 'physical switch', but that just means that they
> will always use a few watts of electricity unless you remove the cord or
> put a physical switch between the box and the electrical outlet.

A few W or mW?  I suspect the latter, but if you've got a lot of
machines doing that, it adds up.

> Are all leds of your ethernet off, when the computer is off and there is
> a ethernet connection to a router? Newer hardware has some 'wake on lan'
> option to boot the computer via ethernet, but of course that means that
> the ethernet cards are not off, but on standby -- wasting your
> electricity even if you don't want to use 'wake on lan'.

WoL, in my experience, is generally disabled by default on all but the
lowest quality, most overpriced POSs you can buy (Dell being the worst
offender).

> > If shutdown isn't meant to work this way, then why does it have a -P option?
> 
> The electronics can not really pull the plug or physically disconnect
> from the sockets. It's like with your TV set: it will always be on
> standby, if 'switched off' by the remote control.

Heck, if the TV can be switched on by remote, it's still drawing power.
Just not as much as it would to run the CRT or backlight and LCD.  I
used to have a stereo that could actually be turned on/off by the
switch, or on/standby by remote.  Though if it was turned off at the
switch, the remote wasn't going to do jack.

> I've even seen some floor lamps that still consume a power of some 10 W
> when switched off, because the transformer is still on and has not been
> disconnected. Better designs have the power switch between socket and
> transformer and _not_ between transformer and light bulb.

That seems like a horrible design flaw, when you consider that a lamp is
basically an extension cord terminating into a switched screw or bayonet
socket on a stick.  The kind of thing that your average 8 year old can
build in an afternoon, given the materials and (depending on how
safety-aware they are) supervision.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Mon, 2008-06-16 at 01:04 +1200, Chris Bannister wrote:
> On Sat, Jun 14, 2008 at 05:59:01PM +0200, David wrote:
> > On Sat, Jun 14, 2008 at 2:03 PM, Chris Bannister
> > <[EMAIL PROTECTED]> wrote:
> > > On Sat, Jun 14, 2008 at 10:51:06AM +0200, David wrote:
> > >> Hi again list.
> > >>
> > >> I'm going to reply to several mails at once. Please excuse the length,
> > >
> > > Please don't do that. *You* can receive your mails in digest mode by
> > > specifying it with some command to the list server, but PLEASE don't
> > > enforce it on others.
> > >
> > > There is already an extreme waste of bandwidth by people not trimming
> > > their posts.
> > >
> > 
> > Hi, I don't understand your complaint (maybe because I haven't used
> > digest mode before, and don't know how it works exactly).
> 
> Digest mode is where a whole lot of messages are rolled into one and
> sent periodically, maybe once a month but not sure.

debian-user-digest is sent out daily, IIRC.  Also, you forgot to mention
that digests should be unrolled into individual messages before replying
to them.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Sat, 2008-06-14 at 17:59 +0200, David wrote:

> If I send 5 separate replies instead of 1, doesn't it use up more
> bandwidth? ie, extra mail envelopes, headers, etc. I did make an
> effort to trim unrelated lines (not everyone on this thread has done
> that).

Brain bandwidth counts, too.  Cramming a bunch of replies into a single
post breaks threading, which requires more effort on the part of your
audience to properly dissect.

> At least with 1 mail you can delete/ignore it easier than 5 separate ones.

Actually, no, you can't:  1 mail is far more difficult to manage than 5
in this case.  What if you only want to ignore/delete one of the
messages and not keep or delete all 5?

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Fri, 2008-06-13 at 14:32 -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 13 Jun 2008, John Allen wrote:
> > Use XFS, and it won't fsck when you boot :)
> 
> Yeah, instead that stupid idea from SGI [fsck.xfs is a no-op] will require
> you to boot from another media to do a periodic xfs_repair on / if you want
> to make sure it is a proper xfs and not some corrupted mess that will
> eventually crash hard and cause massive data loss.

Wow, I really have to wonder what the rationale was behind /that/
design.  Seems shortsighted no matter how you try to cut it.

> Your / should be small, fsck-friendly, and resilient as all heck.

In another words, ext3.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-16 Thread Paul Johnson
On Fri, 2008-06-13 at 11:25 +0200, David wrote:
> But at other times I want to use the PC quickly for something, and
> waiting for fsck to finish isn't an option. The problem is, hitting
> Ctrl+C in the middle of boot fsck leaves your root partition in
> read-only mode, and the machine has a lot of boot problems, and takes
> a long time. I've tried this a few times this morning when I was in a
> hurry (reboot, ctrl+c during fsck, hit boot problems so reboot again),
> but in the end was forced to let fsck finish.
> 
> Is there a way to interrupt the bootup fsck 'cleanly', so that it will
> remount read/write, and retry the next time you boot?

This isn't the method you're looking for...if fsck runs, you shouldn't
ever stop it.

> Even better would be a way to get fsck to run in the background after
> you're already logged into KDE.

After / is already mounted?  No.  Read the fsck manpage.

>  Maybe not to actually fix problems (I
> understand this is hard to do in r/w mode, while being actively used,
> for technical reasons), but at leat to flag them for the next 'real'
> fsck so they can be checked and fixed quickly then if they aren't
> bogus...
> 
> Any suggestions?

Using hibernate instead of shutting down is probably best for home
systems.  Don't screw around with the mount counts/intervals.  If you
hibernate, you'll still be able to power off the machine when you're not
using it, without having to sit through potentially long fscks.

-- 
Paul Johnson
[EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Re: making bootup fsck more user-friendly

2008-06-15 Thread Chris Bannister
On Sun, Jun 15, 2008 at 04:06:55PM +0200, David wrote:
> On Sun, Jun 15, 2008 at 3:04 PM, Chris Bannister
> <[EMAIL PROTECTED]> wrote:
> > On Sat, Jun 14, 2008 at 05:59:01PM +0200, David wrote:
> 
> [...]
> 
> >
> > Consider: person a replies to part of your reply, so they trim out what
> > is not relevant. person b replies to part of your reply, so they trim
> > out what is not relevant. Already the messages are starting to separate,
> > possibly returning to the state that was existing before you
> > concatenated them but with the threads in disarray.
> 
> You make some good points, but I think that my case is a reasonable exception.

Trouble is, all exceptions are reasonable to a certain degree.

> As the original poster, most of the replies are to my original (and
> follow-up) posts. For cases where I am replying to many replies (to my
> original post) at once, the natural (easier for me to write, and
> others to read) format seems to be 1 mail. That one mail makes my
> follow-up more readable, because:

Does your mail reader display threads? I'm guessing not.

> 1) My reply is to to the thread as a whole, rather than to specific
> people on the thread.

Yeah, and people are reading the *thread*

> 2) 1, well-composed mail on one subject is (in my opinion) easier to
> read than many smaller mails. In the longer mail you can establish
> some context, and refer to that context in your replies.

Yeah, but you are _including_ not _refering_

> 3) Receiving 5 mails from 1 person in succession on the same subject
> is a bit annoying :-)

Not sure what you mean.

> I agree with you, that in these cases, putting replies in 1 mail is bad form:
> 
> 1) Mails in different sub-threads (defined as threads where there is
> discussion amongst other people than myself and 1 other person).

Huh? 

> 2) Replying specifically to 1 person (To: header), but including my
> replies to other people

All replies should go to the list. Of course certain mail should be
private. 

[..]

If you were using a threaded mail reader I am sure you would see the
benefits of keepin mails separate.

A lot of your arguments sound suspiciously like someone who is used to
M$ style email programs.

-- 
Chris.
==
"One, with God, is always a majority, but many a martyr has been burned
   at the stake while the votes were being counted."  -- Thomas B. Reed


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread David
On Sun, Jun 15, 2008 at 4:46 PM, Andrew Reid <[EMAIL PROTECTED]> wrote:
> On Sunday 15 June 2008 06:16, David wrote:
[...]
>> Finally, Exim MTA was setup by default on my PC, but I disabled it's
>> init.d script. Reason: My PC is not connected to the internet a lot of
>> the time, so I get a "MTA starting..." message that stalls the startup
>> for a long time. I really hate long delays during startup :-) (see
>> also: Apple Talk service installed by default. wth?)
>
>  Now that you've admitted editing an init.d script, I can no longer
> resist mentioning my rather involved and hack-ish solution.
>

Thanks for the suggestion.

I researched it a bit more.

>From the bootparams(7) manpage:

   Anything  of the form 'foo=bar' that is not accepted as a setup
function as described above is then interpreted as an environment
variable to be
   set.  A (useless?) example would be to use 'TERM=vt100' as a
boot argument.


Therefore, a kernel arg like this in menu.list should work:

WIZZARDX_FASTBOOT=1

And in /etc/init.d/checkroot.sh (after /fastboot check):

if [ "$WIZZARDX_FASTBOOT" == "1" ]; then
[ "$rootcheck" = yes ] && log_warning_msg "WizzardX Fast boot
enabled, so skipping file system check."
rootcheck=no
fi

And in /etc/init.d/checkfs.sh, change:

#
# Check the rest of the file systems.
#
if [ ! -f /fastboot ] && [ ! "$BAT" ] && [ "$FSCKTYPES" != "none" ]

To:

#
# Check the rest of the file systems.
#
if [ ! -f /fastboot ] && [ ! "$BAT" ] && [ "$FSCKTYPES" !=
"none" ] && [ "WIZZARDX_FASTBOOT" != "1" ]


While not very clean (imagine if every boot variation had it's own
grub/lilo line), it sounds like a good work-around until (if) sysvinit
has an official way of bypassing fsck during the boot. The main
supported method seems to be to run 'shutdown -f' to create /fastboot.
The assumption being that you're running a server which is on 99% of
the time, rather than a desktop where you don't always know (during
shutdown) if you will need to bypass harddrive scans on the next boot.

I think that with the uptake of more Debian (and Debian-derived)
installations on desktops, this becomes a more important
consideration.

David.


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread Douglas A. Tutty
On Sun, Jun 15, 2008 at 04:06:55PM +0200, David wrote:
> On Sun, Jun 15, 2008 at 3:04 PM, Chris Bannister
> <[EMAIL PROTECTED]> wrote:
> > On Sat, Jun 14, 2008 at 05:59:01PM +0200, David wrote:
> 
> [...]
> 
> >
> > Consider: person a replies to part of your reply, so they trim out what
> > is not relevant. person b replies to part of your reply, so they trim
> > out what is not relevant. Already the messages are starting to separate,
> > possibly returning to the state that was existing before you
> > concatenated them but with the threads in disarray.
> 
> You make some good points, but I think that my case is a reasonable exception.
> 

How about this.  :

This is sort-of Unix.  Unix fsck's perodically on startup and it can't
be "scheduled" to run at a specified time since it has to happen on
boot, unless you schedule shutdowns on a 24/7 box (which you don't
have).  Your only choice is to either schedule fscks or edit the
initscript that checks to see if its time to fsck and ask for
confirmation.

This is a mailing list.  As with all mailing lists, there is both a
culture of use and a code of conduct.  You've been asked politely to not
concatenate emails and reply in a blob; not only did you do that but you
added more problems instead of starting a new thread.

This is sort-of Unix.  A Unix box needs a functional MTA to send local
mail.  If your exim startup is slow, its probably trying to do a DNS
lookup which means you didn't answer the questions properly when you
configured it.  Try dpkg-reconfigure the exim4 server.  You may need to
adjust the level threshold (e.g. P low) so that you get asked if you
want to minimize DNS queries for dial-up use.  If you want to discuss
MTA setup further, start a new thread.

<\small flame>

Doug.


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread Andrew Reid
On Sunday 15 June 2008 06:16, David wrote:
> Thanks for the continuing replies and suggestions.

> > Why not just run fsck manually (i.e. shutdown -RF now) whenever you
> > want.  If you do it frequently enough, you'll never hit the automatic
> > checking counter: you'll only get caught if you forget.  Set up cron to
> > send you an email reminder every week or something.
>
> This is a decent work-around. However, ideally I should be able to
> configure the scheduled fscks to run at a more conveniant time, and
> automatically, rather than having to work my own schedule around the
> needs of the PC.
>
> Another problem is that I don't know how to setup mail relaying on my
> workstation (so that mail from local accounts get queued, and then
> forwarded to my gmail account when I dial up to the internet). I'm not
> sure if it's worth the trouble to research and set that up :-)
>
> Finally, Exim MTA was setup by default on my PC, but I disabled it's
> init.d script. Reason: My PC is not connected to the internet a lot of
> the time, so I get a "MTA starting..." message that stalls the startup
> for a long time. I really hate long delays during startup :-) (see
> also: Apple Talk service installed by default. wth?)
  
  Now that you've admitted editing an init.d script, I can no longer
resist mentioning my rather involved and hack-ish solution.

  You could add code to the /etc/init.d/checkfs.sh 
and/or /etc/init.d/checkroot.sh scripts to check for a custom 
kernel argument, and "exit 0" if they find it.  
  These scripts run pretty early in rcS.d.  If you're lucky, 
/proc has already been mounted by the time they
run, and you can just grep /proc/cmdline for your argument.
(I *think* /proc is mounted by the initramfs, so it's available
to all the init scripts, but I'm not 100% sure.)

  You could then add your custom argument to the kernel boot line.
Make sure to use one that's unique, so it doesn't confuse the
other init scripts, like maybe "wizzardxfastboot" or something.

  Then, make a special stanza in /boot/grub/menu.lst that has
this argument.

  Then, when you want to boot up quickly and skip the fsck, you 
can just cursor-down to the appropriate line in the grub menu,
hit return, and you're away.

  This relies on a few things being true which I've only guessed
at -- you should have an initramfs, you need to be using grub, 
/proc has to be mounted in time as already mentioned, and it has
to be true that unrecognized kernel options are harmless, which 
I think is the case, although you need to watch out for scripts
which use the argument-count for nefarious purposes.  I'm not aware
of any, but you never know.

  If it works, this seems to solve your problem, if I've understood
it correctly.

-- A.
-- 
Andrew Reid / [EMAIL PROTECTED]


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread David
On Sun, Jun 15, 2008 at 3:04 PM, Chris Bannister
<[EMAIL PROTECTED]> wrote:
> On Sat, Jun 14, 2008 at 05:59:01PM +0200, David wrote:

[...]

>
> Consider: person a replies to part of your reply, so they trim out what
> is not relevant. person b replies to part of your reply, so they trim
> out what is not relevant. Already the messages are starting to separate,
> possibly returning to the state that was existing before you
> concatenated them but with the threads in disarray.

You make some good points, but I think that my case is a reasonable exception.

(also, repliers will be cutting out unrelated lines with either format)

As the original poster, most of the replies are to my original (and
follow-up) posts. For cases where I am replying to many replies (to my
original post) at once, the natural (easier for me to write, and
others to read) format seems to be 1 mail. That one mail makes my
follow-up more readable, because:

1) My reply is to to the thread as a whole, rather than to specific
people on the thread.

2) 1, well-composed mail on one subject is (in my opinion) easier to
read than many smaller mails. In the longer mail you can establish
some context, and refer to that context in your replies.

3) Receiving 5 mails from 1 person in succession on the same subject
is a bit annoying :-)

I agree with you, that in these cases, putting replies in 1 mail is bad form:

1) Mails in different sub-threads (defined as threads where there is
discussion amongst other people than myself and 1 other person).

2) Replying specifically to 1 person (To: header), but including my
replies to other people

3) When readers are only interested in specific replies (maybe to
their message), but my mails have other people's messages in it.

I wouldn't for example reply to Henrique's XFS sub-thread along with
my other replies, because the topic has changed, and other people have
been replying to him on that sub-thread.

Would it be better that instead of in this format:

Hi list 

On 123, ABC said:
> On 456, David said
> ABC's reply

My reply bla bla

On 456, XYZ said:
> On 456, David said
> XYZ's reply

My reply bla bla

... more replies ...

I write it like this?

Hi again list. 

Ealier posters suggested that . I have 

Harry suggested to . This is fine, but 
would work better for me, because of .

... more replies ...

Thanks for the replies. I'm now going to try  and
will get back to the list later.

Or, should I in every case split it into separate mails? Like this:

---mail 1---
On 123 John said
> On 123 David said:
> ...[on topic A]
> [John's reply]

Thanks, but I have a problem with this, because . I will
try  instead. I will describe this further in my reply
to Paul.

---mail 2---
On 123 Paul said
> On 123 David said:
> ...[Also on topic A]
> [Paul's reply]

This is reasonable, but I want to mention  too. See also
my ealier reply to John.

... 3 more mails from me...

David.


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread Chris Bannister
On Sat, Jun 14, 2008 at 05:59:01PM +0200, David wrote:
> On Sat, Jun 14, 2008 at 2:03 PM, Chris Bannister
> <[EMAIL PROTECTED]> wrote:
> > On Sat, Jun 14, 2008 at 10:51:06AM +0200, David wrote:
> >> Hi again list.
> >>
> >> I'm going to reply to several mails at once. Please excuse the length,
> >
> > Please don't do that. *You* can receive your mails in digest mode by
> > specifying it with some command to the list server, but PLEASE don't
> > enforce it on others.
> >
> > There is already an extreme waste of bandwidth by people not trimming
> > their posts.
> >
> 
> Hi, I don't understand your complaint (maybe because I haven't used
> digest mode before, and don't know how it works exactly).

Digest mode is where a whole lot of messages are rolled into one and
sent periodically, maybe once a month but not sure. So if there were
bits you wanted to keep it would involve a lot of editing trimming etc

> If I send 5 separate replies instead of 1, doesn't it use up more
> bandwidth? ie, extra mail envelopes, headers, etc. I did make an
> effort to trim unrelated lines (not everyone on this thread has done
> that).

Consider: person a replies to part of your reply, so they trim out what
is not relevant. person b replies to part of your reply, so they trim
out what is not relevant. Already the messages are starting to separate,
possibly returning to the state that was existing before you
concatenated them but with the threads in disarray.

> Or are you saying I should make my posts as short as possible, even if
> I feel that a longer post is required to reduce ambiguity & follow-up
> mails explaining what I really meant.

Not at all, quite often a longer post saves the need of having to post
several short ones.

> At least with 1 mail you can delete/ignore it easier than 5 separate ones.

What about deleting/ignoring 2 or 3 separate ones, at least you have the
choice.

> Please explain in more detail why 1 longer mail is worse, or provide a
> link where I can read more.

Hopefully, I already have. Also consider why threads exist in the first
place. Maybe a google on "why threads" and/or "digest email"


-- 
Chris.
==
"One, with God, is always a majority, but many a martyr has been burned
   at the stake while the votes were being counted."  -- Thomas B. Reed


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread David
Oops, I stripped out the attribution:

 Douglas A. Tutty <[EMAIL PROTECTED]> wrote:
>> There are several hard-disk HOWTOs in the doc-linux-howto packages

[...]

Sorry about that.

David.


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread David
>> Unfortunately, experimenting with other filesystems will have to wait
>> until I have a spare drive. I don't know of a way to convert to other
>> filesystems on the fly :-) Also, the need to defer fsck seems like a
>> poor reason to go through the trouble of switching my home PC's
>> filesystem :-)
>>
>
> There are several hard-disk HOWTOs in the doc-linux-howto packages (pick
> your format).  Its not that hard if you have a spare partition or just
> good backups.  Its especially easy if you're using LVM.  Without LVM I
> admit it can be a bit of a shell-game but it only takes a few minutes
> once you map it out.

I don't like to use LVM unless there is a compelling reason. It adds
additional complexity to managing your filesystems. Also there is
greater risk of problems when you use it (eg: 1 drive starts having
problems, so your entire lvm becomes unusable until you fix the
problem).

The only time I've used LVM was on work servers where they originally
had 1 mount per drive, so the network shares needed to be
moved/trimmed/etc around whenever one of the partitions filled up.

I'm sure if you use LVM a lot, then it becomes second nature, and you
end up using it everywhere due to the extra flexibility you get
(analogy: using git instead of a centralized SCM tool). But for noobs
who barely know how to work with it (me), it's easier to just use the
default filesystem :-) Beats having to refer to the manual each time
you need to fix/check something that I already know how to do without
LVM.

> I would call my home computer extremely critical.  I don't want some
> bug corrupting /usr or /var and making it so that I can't boot to fix
> it.  With / separate and small, the chances of it getting corrupted are
> rather small.
>

How real a problem is this? I've never had data loss problems with
ext3. Are there benchmarks/anecdotal evidence which show how much more
reliable a separate root partition is?

I would have thought that you'd only separate root part off would be:

- You like to use LVM a lot
- You have a traditional unix-like filesystem setup, with a lot of
root dirs on separate partitions/nfs shares
- You use unstable filesystems

In the rare event that root part does have a serious error (maybe
hardware/power failure/etc):

- ext3 (and ext2?) does make backup copies of the superblock.

- For all but the most serious problems you should be able to recover
by booting from another medium (cd,other hdd, etc) and running
fsck/grub/etc

- Hopefully you do have good backups in the event that something
catastrophic happens to the harddrive (if it does, your other
partitions will probably be killed at the same time).

David.


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



Re: making bootup fsck more user-friendly

2008-06-15 Thread David
Thanks for the continuing replies and suggestions.

Again I will put replies in one mail, since noone has given me a good
reason not to, yet. Please comment on this if it is a problem.

On Sun, Jun 15, 2008 at 12:00 AM, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 13, 2008 at 01:38:19PM +0200, David wrote:
>
>> This isn't a solution for me. I want fsck to run regularly,
>
> Why?
>

Rephrased: I want fsck to run as often as the system wants to. I
assume it has good reasons to be scheduled as often as it is by
default. Exception: When I don't have time to wait for it.

=

On Sun, Jun 15, 2008 at 3:00 AM, Nick Lidakis <[EMAIL PROTECTED]> wrote:
> I don't know if that is the full extent of your computer usage (i.e.,
> getting on the internet to check mail quickly) when being interrupted by
> fsck. If that is all you need, and if you might be in the market for a new
> mother board in the near future,  then you might want to consider getting
> one of the new ASUS boards with a Splashtop BIOS. There's more info on the
> company's website: http://www.splashtop.com/

Mostly web browsing, but I do sometimes ssh over to another box of
mine (router) to check it's download (over dialup) status. Also I like
to play some music from my harddrive through Audacious while getting
ready for work.

I doubt that the trimmed-down Firefox has all the add-ins I like to
use. But it's something worth looking into. Thanks for the suggestion.

=

On Sun, Jun 15, 2008 at 3:31 AM, Douglas A. Tutty <[EMAIL PROTECTED]> wrote:
> Why not just run fsck manually (i.e. shutdown -RF now) whenever you
> want.  If you do it frequently enough, you'll never hit the automatic
> checking counter: you'll only get caught if you forget.  Set up cron to
> send you an email reminder every week or something.
>

This is a decent work-around. However, ideally I should be able to
configure the scheduled fscks to run at a more conveniant time, and
automatically, rather than having to work my own schedule around the
needs of the PC.

Another problem is that I don't know how to setup mail relaying on my
workstation (so that mail from local accounts get queued, and then
forwarded to my gmail account when I dial up to the internet). I'm not
sure if it's worth the trouble to research and set that up :-)

Finally, Exim MTA was setup by default on my PC, but I disabled it's
init.d script. Reason: My PC is not connected to the internet a lot of
the time, so I get a "MTA starting..." message that stalls the startup
for a long time. I really hate long delays during startup :-) (see
also: Apple Talk service installed by default. wth?)

David.


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Henrique de Moraes Holschuh
On Sat, 14 Jun 2008, Douglas A. Tutty wrote:
> If data=journal is subject to kernel bugs then you are saying that Linux
> doensn't have any filesystem suitable for non-UPS-protected systems.  If

Neither will be safe against that, unless you have write caching disabled OR
write barriers enabled, and working right on the HBA (host/port controller)
and disc/storage.

It IS possible that data=journal should be safer in theory for certain
operations, but I don't know enough about ext3 behaviour to answer that one.

> the devs don't properly audit the data=journal code then they shouldn't
> provide it as an option in a production kernel.

It is as audited as the data=ordered code.  It is less *used*.  If you think
this is even worse, you're right.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Douglas A. Tutty
On Sat, Jun 14, 2008 at 10:00:08PM +, Tzafrir Cohen wrote:
> On Fri, Jun 13, 2008 at 01:38:19PM +0200, David wrote:
> 
> > This isn't a solution for me. I want fsck to run regularly, 
> 
> Why?

Why not just run fsck manually (i.e. shutdown -RF now) whenever you
want.  If you do it frequently enough, you'll never hit the automatic
checking counter: you'll only get caught if you forget.  Set up cron to
send you an email reminder every week or something.

Doug.


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Nick Lidakis

David wrote:


Here is a summary of my PC usage:

1) Turn on home PC briefly to check e-mail etc, before going to work,
then shut down.

2) Back from work, turn it on for the evening, and off again before
going to bed.

The PC is near my bed, I don't like to have the noisy fans etc going
while I'm trying to sleep :-) And I don't see the point of leaving it
on for 9+ hours while I'm not at home.


I don't know if that is the full extent of your computer usage (i.e., 
getting on the internet to check mail quickly) when being interrupted by 
fsck. If that is all you need, and if you might be in the market for a 
new mother board in the near future,  then you might want to consider 
getting one of the new ASUS boards with a Splashtop BIOS. There's more 
info on the company's website: http://www.splashtop.com/


In a nut shell, you'll be able to boot into a Linux based BIOS with a 
slimmed down version of Firefox. Perfect for checking a  quick email or 
other internet related info.


I'm currently looking at this board which is available now from Newegg: 
http://www.newegg.com/Product/Product.aspx?Item=N82E16813131299



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




Re: making bootup fsck more user-friendly

2008-06-14 Thread Tzafrir Cohen
On Fri, Jun 13, 2008 at 01:38:19PM +0200, David wrote:

> This isn't a solution for me. I want fsck to run regularly, 

Why?

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED] ||  best
ICQ# 16849754 || friend


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread David
Hi list.

For those interested, I've filed 2 wishlist bugs against the BTS:

sysvinit: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486258

e2fsprogs: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486261

David.


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Douglas A. Tutty
On Sat, Jun 14, 2008 at 10:51:06AM +0200, David wrote:
 
> On Fri, Jun 13, 2008 at 6:54 PM, Douglas A. Tutty <[EMAIL PROTECTED]> wrote:
> > On Fri, Jun 13, 2008 at 11:25:23AM +0200, David wrote:
> [...]
> >
> > Sort answer, read the disk-related HOWTOs and try switching to JFS.
> >
> 
> Unfortunately, experimenting with other filesystems will have to wait
> until I have a spare drive. I don't know of a way to convert to other
> filesystems on the fly :-) Also, the need to defer fsck seems like a
> poor reason to go through the trouble of switching my home PC's
> filesystem :-)
> 

There are several hard-disk HOWTOs in the doc-linux-howto packages (pick
your format).  Its not that hard if you have a spare partition or just
good backups.  Its especially easy if you're using LVM.  Without LVM I
admit it can be a bit of a shell-game but it only takes a few minutes
once you map it out. 

Unless you're willing to rewrite fsck to get a defer mode, switching to
a faster fs is a valid option.  

 
> I disagree here. You can easily use up 300 MB on / by installing a few
> large packages from Debian. Or are you saying that / should contain
> almost nothing, and that /usr, /var/, etc should all be on separate
> partitions?

Yes, when one says that / is 300MB, it means that /usr, /var, and /home
are separate.  Etch won't fit on 512MB complete yet alone having any
special packages installed.

> 
> Maybe if your system is extremely critical you would need to have / this way.
> 
> Personally, I would like to be able to take a 500 GB drive, and put
> the whole filesystem on / (including /boot, and a swap file) in my
> home PC, and not be forced to wait for bootup fsck to scan the entire
> drive every X days/boot before I can use it. I don't mind if it takes
> an hour to scan, as long as that hour is not when I need to be
> actively using the PC (after I tell the machine to shut down is a good
> time).

I would call my home computer extremely critical.  I don't want some
bug corrupting /usr or /var and making it so that I can't boot to fix
it.  With / separate and small, the chances of it getting corrupted are
rather small.

Doug.


> 
> Also, that hour-long scan needs to be cleanly interruptible. Ctrl+C or
> ESC needs to do the right thing.
> 
> David.
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Douglas A. Tutty
On Sat, Jun 14, 2008 at 10:32:55AM -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 13 Jun 2008, Douglas A. Tutty wrote:
 
> Watch out that data=journal.  It is far more kernel-bug prone than
> data=ordered, for the simple fact that almost everyone uses data=ordered,
> including those who mess with the ext3 code, so bugs can hide in the
> data=journal code paths a lot more easily.
> 

If data=journal is subject to kernel bugs then you are saying that Linux
doensn't have any filesystem suitable for non-UPS-protected systems.  If
the devs don't properly audit the data=journal code then they shouldn't
provide it as an option in a production kernel.

Doug.


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread David
On Sat, Jun 14, 2008 at 2:03 PM, Chris Bannister
<[EMAIL PROTECTED]> wrote:
> On Sat, Jun 14, 2008 at 10:51:06AM +0200, David wrote:
>> Hi again list.
>>
>> I'm going to reply to several mails at once. Please excuse the length,
>
> Please don't do that. *You* can receive your mails in digest mode by
> specifying it with some command to the list server, but PLEASE don't
> enforce it on others.
>
> There is already an extreme waste of bandwidth by people not trimming
> their posts.
>

Hi, I don't understand your complaint (maybe because I haven't used
digest mode before, and don't know how it works exactly).

If I send 5 separate replies instead of 1, doesn't it use up more
bandwidth? ie, extra mail envelopes, headers, etc. I did make an
effort to trim unrelated lines (not everyone on this thread has done
that).

Or are you saying I should make my posts as short as possible, even if
I feel that a longer post is required to reduce ambiguity & follow-up
mails explaining what I really meant.

At least with 1 mail you can delete/ignore it easier than 5 separate ones.

Please explain in more detail why 1 longer mail is worse, or provide a
link where I can read more.

Thanks,

David.


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Henrique de Moraes Holschuh
On Fri, 13 Jun 2008, Douglas A. Tutty wrote:
> On Fri, Jun 13, 2008 at 02:32:29PM -0300, Henrique de Moraes Holschuh wrote:
> > Your / should be small, fsck-friendly, and resilient as all heck.  If
> > running fsck in your / takes enough time that you wouldn't afford to do it
> > at every boot (in a recent system), then your / is too large in my book.
> > 
> > The same holds for any other partition you can't easily umount to fsck in
> > maintenance mode.
> 
> Agreed.  / only needs to be 300 MB or so with a separate /boot (if
> needed for the hardware).  / with /boot easily fits in 512 MB and takes
> only a few seconds to fsck with ext3 and with data=journal still runs
> pleanty fast.

Watch out that data=journal.  It is far more kernel-bug prone than
data=ordered, for the simple fact that almost everyone uses data=ordered,
including those who mess with the ext3 code, so bugs can hide in the
data=journal code paths a lot more easily.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Henrique de Moraes Holschuh
On Fri, 13 Jun 2008, charlie derr wrote:
> Henrique de Moraes Holschuh wrote:
>> On Fri, 13 Jun 2008, Johannes Wiedersich wrote:
>>> I guess the defaults are very conservative settings regarding
>>> reliability of your data and were implemented at a time when there was
>>> no journalling for data protection.
>>
>> Actually, kernel bugs, memory problems, corruption in the CPU to disk
>> platter path, and media bitrot are the reasons for which scheduled fsck
>> exist.  Journals don't help or hinder it in any way.
>>
>> Otherwise, you'd fsck only on unclean shutdown, or after a known
>> data-trashing event (like an erroneous write access to the raw device, or IO
>> errors on the device, etc).
>
> I'd love an explanation about why only certain filesystem types seem to 
> "need" this fsck as a regular event.   Maybe I've got some details wrong, 

The only thing that makes periodic fsck rarely needed is a filesystem which
uses strong enough CRC or ECC to protect ***all*** of its metadata, and for
those with logs and journals, this ALSO requires it to deal properly with
all possible failure modes for replay (otherwise it will corrupt itself).

You'd still need to fsck it every time you suspect of kernel bugs in the
filesystem code.

A filesystem that does live fsck (not just data integrity testing, but an
actuall full filesystem metadata integrity check like fsck does) is just
doing the periodic fsck for you anyway, so it doesn't count.

As an example: XFS has extremely well made test suites that SGI runs on the
code in the kernel, so bugs (nowadays) are very rare in mainline *releases*
(not -rc!).  That doesn't mean your hardware will take care of the data XFS
entrusted to it as it should have.  We are NOT using it on high-end SGI
hardware, after all.

AFAIK, none of the for-production filesystems have full metadata protection
yet, or live fsck capabilities.  But I really might be wrong about this, so
let's see if someone who knows better can point us to filesystems with that
feature.

But DO note that you can't have it both ways.  The more resilient and safe a
filesystem tries to be, the SLOWER it will have to be in order to enforce
that.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread Chris Bannister
On Sat, Jun 14, 2008 at 10:51:06AM +0200, David wrote:
> Hi again list.
> 
> I'm going to reply to several mails at once. Please excuse the length,

Please don't do that. *You* can receive your mails in digest mode by
specifying it with some command to the list server, but PLEASE don't
enforce it on others.

There is already an extreme waste of bandwidth by people not trimming
their posts.

-- 
 sig lost after 5000dd


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



Re: making bootup fsck more user-friendly

2008-06-14 Thread David
Hi again list.

I'm going to reply to several mails at once. Please excuse the length,
or let me know if separate mails is better netiquette.

On Fri, Jun 13, 2008 at 5:02 PM, Johannes Wiedersich
<[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 2008-06-13 13:38, David wrote:
>> On Fri, Jun 13, 2008 at 1:12 PM, Johannes Wiedersich
>> <[EMAIL PROTECTED]> wrote:
>>> read 'man tune2fs' for some tips for setting interval and mount count to
>>> something that better meets your needs.
>>
>> This isn't a solution for me. I want fsck to run regularly, but to
>> still have a way to by-pass it when I need to.  Making fsck run less
>> frequently will leave me with the same problem. eg every 100th boot I
>> will still have to wait 10-20 minutes before I can start using the PC,
>> which is a royal PITA.
>
> So basically you want to have the check without having to wait for the
> check to finish. I don't know, how you want this to be accomplished.
> Either the check runs automatically or you have to run it manually.
>

Like a later poster said, I just want the ability to defer it if I
need to boot up quickly this time. I don't have a problem with letting
the check run if I'm not in too much of a hurry. What would work best
for me is to have 2 abilities:

1) Defer the boot fsck until later

2) When I shut down the machine, have the option to fsck then (eg:
takes 20 minutes, but then shuts down).

I know this can be accomplished in Ubuntu (see my original post). But
I'd like a way to do it on Debian Unstable by only using software from
the repo :-)

>>> Ctrl-C worked without problems the last time I tried on my debian lenny.
>>>
>>
>> I tested this on 2 Sid boxes, both had the problem. In the past (with
>> Testing & Stable) hitting Ctrl-C will randomly either leave the
>> partition read-only, or will re-mount it in write mode.
>
> OK, I checked again. Ctrl-C works for /home but not for / . So, I guess
> you would have to move your data to another partition. I have a rather
> small / partition, so fsck is fast and I probably never have interrupted
> it up to now. My /home partition is large, takes a long time to fsck and
> I haven't had problems interrupting it in order to have it checked next
> time. Again, since the feature works for other partitions than / , I'd
> guess that there is a good reason why it isn't implemented for / .
> (Maybe I'm wrong. Is there someone out there who knows better?)
>

Thanks for discovering that. Does anyone know if it's documented?

My guess is that if fsck on / terminates for an unknown reason,
sysvinit thinks that it's safer to leave the drive in read-only mode
so a system administrator can check it, and retry the boot & fsck.
Like a less severe version of the prompt to go to single-user mode
when a serious problem is found during the scan. It would be nice if
it printed a message so we knew that this was it's intent...

Or, more likely, the logic for scanning /, and scanning all other
partitions is implemented separately, and only the logic for non-/
partitions has the ability to mount r/w after the user hits Ctrl+C.

I would like the *option* to interrupt scanning / (cleanly), and not
be forced to fsck it when it's inconveniant to me. My PC's
housekeeping needs aren't more important than me! :-)

I have more comments on this subject, see a later reply.

>>> Set your mount count and intervals apropriately for your needs. You
>>> could also fsck manually (shuttdown's -F option), whenever it suits you,
>>> eg. disable automatic checking and only check manually.
>>
>> This is a pain. I would need to find time when I'm not using the PC,
>> but still want it to be on, which is not often. I like to turn off my
>> PC when I'm not using it, and to not have to wait for it when I do
>> want to use it.
>
> You cannot reliably fsck / when the computer is on. It either has to be
> at boot time or else you have to boot from another / like from a rescue
> CD/DVD.
>

I don't mind it fscking, I mind it fscking when I have more important
things to do than wait for it to finish.

  - /sbin/shutdown allows the user to (any of these would help):
* Force a fsck during the restart (-rF), and then to shut down the 
 system.
>>> Does not work for me, because I want to shut down the computer
>>> completely, not just waste all that power with standby mode. I.e. if you
>>> want to turn off the power supply completely, shutdown is not enough,
>>> YOU have to switch off manually.
>>>
>>
>> I think this depends on hardware. Most of my boxes shut down
>> completely when I run 'shutdown -P'. But there are a few (maybe old
>> kernel) which go into stand-by mode even when I really want shutdown
>> to power it off.
>
> In my experience *any* computer will be in some kind of standby mode as
> long as there is no physical interruption to the power. Some power
> supplies don't have a 'physical switch', but that just means that they
> will always use a few watts of electricity

Re: making bootup fsck more user-friendly

2008-06-13 Thread Douglas A. Tutty
On Fri, Jun 13, 2008 at 02:32:29PM -0300, Henrique de Moraes Holschuh wrote:
> Your / should be small, fsck-friendly, and resilient as all heck.  If
> running fsck in your / takes enough time that you wouldn't afford to do it
> at every boot (in a recent system), then your / is too large in my book.
> 
> The same holds for any other partition you can't easily umount to fsck in
> maintenance mode.
> 

Agreed.  / only needs to be 300 MB or so with a separate /boot (if
needed for the hardware).  / with /boot easily fits in 512 MB and takes
only a few seconds to fsck with ext3 and with data=journal still runs
pleanty fast.

Doug.


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread charlie derr

Henrique de Moraes Holschuh wrote:

On Fri, 13 Jun 2008, Johannes Wiedersich wrote:

I guess the defaults are very conservative settings regarding
reliability of your data and were implemented at a time when there was
no journalling for data protection.


Actually, kernel bugs, memory problems, corruption in the CPU to disk
platter path, and media bitrot are the reasons for which scheduled fsck
exist.  Journals don't help or hinder it in any way.

Otherwise, you'd fsck only on unclean shutdown, or after a known
data-trashing event (like an erroneous write access to the raw device, or IO
errors on the device, etc).



I'd love an explanation about why only certain filesystem types seem to "need" this fsck as a regular event.   Maybe I've got some 
details wrong, but my understanding has always been that xfs, reiserfs and others don't recommend any "counting" mechanism (to 
force an fsck at a certain number of boots, or after a certain period of time).  If one of you experts has time to enlighten me 
about this, and whether there's something about the ext2/ext3 family of filesystems that makes it particularly susceptible to 
corruption, or whether I'm just misinformed about the best practices for these other journaling filesystems (which I admittedly 
have little 1st-hand experience with), I'd very much appreciate any info or links to info that will teach me more.


thanks so very much in advance,
~c


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




Re: making bootup fsck more user-friendly

2008-06-13 Thread Henrique de Moraes Holschuh
On Fri, 13 Jun 2008, John Allen wrote:
> Use XFS, and it won't fsck when you boot :)

Yeah, instead that stupid idea from SGI [fsck.xfs is a no-op] will require
you to boot from another media to do a periodic xfs_repair on / if you want
to make sure it is a proper xfs and not some corrupted mess that will
eventually crash hard and cause massive data loss.

For the other partitions, XFS is fine and often the best choice.  But for
the root?  It is a Bad Idea.

Your / should be small, fsck-friendly, and resilient as all heck.  If
running fsck in your / takes enough time that you wouldn't afford to do it
at every boot (in a recent system), then your / is too large in my book.

The same holds for any other partition you can't easily umount to fsck in
maintenance mode.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread Henrique de Moraes Holschuh
On Fri, 13 Jun 2008, Johannes Wiedersich wrote:
> I guess the defaults are very conservative settings regarding
> reliability of your data and were implemented at a time when there was
> no journalling for data protection.

Actually, kernel bugs, memory problems, corruption in the CPU to disk
platter path, and media bitrot are the reasons for which scheduled fsck
exist.  Journals don't help or hinder it in any way.

Otherwise, you'd fsck only on unclean shutdown, or after a known
data-trashing event (like an erroneous write access to the raw device, or IO
errors on the device, etc).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread Andrew Sackville-West
On Fri, Jun 13, 2008 at 05:02:15PM +0200, Johannes Wiedersich wrote:
> On 2008-06-13 13:38, David wrote:
> > On Fri, Jun 13, 2008 at 1:12 PM, Johannes Wiedersich
> > <[EMAIL PROTECTED]> wrote:
> >> read 'man tune2fs' for some tips for setting interval and mount count to
> >> something that better meets your needs.
> > 
> > This isn't a solution for me. I want fsck to run regularly, but to
> > still have a way to by-pass it when I need to.  Making fsck run less
> > frequently will leave me with the same problem. eg every 100th boot I
> > will still have to wait 10-20 minutes before I can start using the PC,
> > which is a royal PITA.
> 
> So basically you want to have the check without having to wait for the
> check to finish. I don't know, how you want this to be accomplished.
> Either the check runs automatically or you have to run it manually.

I think maybe he's looking for an option to *defer* fsck to the next
boot. That is, fsck should accept a particular key stroke to cleanly
stop the fsck, but leave the partition in a state where it will fsck
on the next boot. I personally think this is a pretty good idea in
general, though for me a disaster as I'd just defer fsck every time.  

OP could probably tweak the boot scripts to test this idea with a
simple prompt as to whether to proceed with the fsck or defer it.

A



signature.asc
Description: Digital signature


Re: making bootup fsck more user-friendly

2008-06-13 Thread Douglas A. Tutty
On Fri, Jun 13, 2008 at 11:25:23AM +0200, David wrote:
> Every X days or Y reboots, Linux (on my home PC, which I boot & shut
> down 2x each day) wants to scan partitions for errors at startup.
> While this is a bit annoying (can't use the PC for 10-20 minutes), I
> usually let it finish and read a book while waiting.

If you don't have power outages, here is one time where JFS may be of
use (even with IBM's caution, see my recent post in another thread).
JFS was designed to allow a fast fsck on boot so that servers don't
spend a lot of time fscking after a crash.

I don't know if XFS also has this feature.

JFS works very well, is journalling, but like all meta-data-only
journalling filesystems, can loose data if you loose power, although any
filesystem can loose data even with data journalling if the data is in
transit between the kernel and the platter (in a cache somewhere).

Sort answer, read the disk-related HOWTOs and try switching to JFS.

Doug.


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread John Allen

David wrote:

Hi list.

I already checked this problem with Google and with my LUG, and would
like to ask on this mailing list before I fire off a bunch of feature
requests in the Debian BTS.

= FROM MAIL TO MY LUG =

I've tried Googling for this but haven't found much info, so asking here.

Every X days or Y reboots, Linux (on my home PC, which I boot & shut
down 2x each day) wants to scan partitions for errors at startup.
While this is a bit annoying (can't use the PC for 10-20 minutes), I
usually let it finish and read a book while waiting.

  

Use XFS, and it won't fsck when you boot :)

Well it will, but the fsck.xfs does pretty much nothing.

But at other times I want to use the PC quickly for something, and
waiting for fsck to finish isn't an option. The problem is, hitting
Ctrl+C in the middle of boot fsck leaves your root partition in
read-only mode, and the machine has a lot of boot problems, and takes
a long time. I've tried this a few times this morning when I was in a
hurry (reboot, ctrl+c during fsck, hit boot problems so reboot again),
but in the end was forced to let fsck finish.

Is there a way to interrupt the bootup fsck 'cleanly', so that it will
remount read/write, and retry the next time you boot?

Even better would be a way to get fsck to run in the background after
you're already logged into KDE. Maybe not to actually fix problems (I
understand this is hard to do in r/w mode, while being actively used,
for technical reasons), but at leat to flag them for the next 'real'
fsck so they can be checked and fixed quickly then if they aren't
bogus...

Any suggestions?

= A FEW (TRIMMED FOR BREVITY) REPLIES FROM MY LUG POST =

On Fri, Jun 13, 2008 at 10:08 AM, Morgan Collett
<[EMAIL PROTECTED]> wrote:
  

Ubuntu 8.04 / hardy supports cancelling the fsck on boot cleanly with
Esc (or is it Ctrl-C? I haven't tried it myself.)

You can change the number of boots:
http://ubuntuforums.org/showpost.php?p=5050801&postcount=14

You can change it to once a month:
http://martin.ankerl.com/2007/11/03/howto-change-ubuntu-forced-fsck/

You can try AutoFsck which does the fsck on shutdown instead:
http://micrux.net/?p=52 AT YOUR OWN RISK of course...




---

On Fri, Jun 13, 2008 at 10:12 AM, Deon Bredenhann
<[EMAIL PROTECTED]> wrote:
  

If you leave the box on or running through the night, just force an fsck
once a week.

Have a cron entry at 2 in the morning run 'shutdown -F -r now'
This will reboot and force fsck to run. If you do this on a weekly base,
you will most likely not run into the I'm-in-a-hurry-now problem. Would
like to know what other solutions people have out there.



---

On Fri, Jun 13, 2008 at 10:12 AM, Liam Smit <[EMAIL PROTECTED]> wrote:
  

I'd suggest increasing the number of reboots between file system
checks.  Have a look at tune2fs.

A more drastic approach would be to change to a different file system
which does not require such frequent fsck.



Is there a way to interrupt the bootup fsck 'cleanly', so that it will
remount read/write, and retry the next time you boot?
  

Probably not once it's running i.e. there is an element of risk
involved in stopping a running fsck. Rather prevent it from starting.



Even better would be a way to get fsck to run in the background after
you're already logged into KDE. Maybe not to actually fix problems (I
understand this is hard to do in r/w mode, while being actively used,
for technical reasons), but at leat to flag them for the next 'real'
fsck so they can be checked and fixed quickly then if they aren't
bogus...
  

That would probably corrupt the file system being checked unless it
was first unmounted.



==

I researched the options they mentioned, and I'm not happy with the
situation (at least with Debian Unstable, I don't use Ubuntu).

I want to submit these feature requests, but first I'd like some
feedback from this list before I do so:

sysvinit:

 - When it's time (during startup)to run a full fsck, give the user a
few seconds to hit ESC before running them

 - /sbin/shutdown allows the user to (any of these would help):
   * Force a fsck during the restart (-rF), and then to shut down the system.
   * Force a fsck during shutdown, after drives have been unmounted
 + But only if an fsck is due the next time the machine boots?

e2fsprogs:

 - fsck allows the user to abort cleanly with ESC (fsck will be
retried on the next boot)

 - ability for a readonly fsck on a r/w filesystem to gather info to
make a later fsck on the filesystem as r/o to find and fix problems
faster.

David.


  



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




Re: making bootup fsck more user-friendly

2008-06-13 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2008-06-13 17:11, Kamaraju S Kusumanchi wrote:
> David wrote:
> 
>> Every X days or Y reboots, Linux (on my home PC, which I boot & shut
>> down 2x each day) wants to scan partitions for errors at startup.
>> While this is a bit annoying (can't use the PC for 10-20 minutes), I
>> usually let it finish and read a book while waiting.

[...]

> Now a days, the only time I do a complete reboot of my laptop is when I had
> upgraded the kernel (due to a security upgrade).

In other words, you usually bypass fsck'ing. With respect to fsck it is
about the same as setting the maximum mount count to something close to
infinity.

Johannes

NB: On the other hand, with a journalling FS fsck is probably not as
important as it used to be...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIUqEZC1NzPRl9qEURAjm+AJ95Opv7dOBkSoGN1hsQ92Krdw5pBwCfeQVa
mYV9O98t3V3qVwIbOHCW304=
=4jiH
-END PGP SIGNATURE-


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread Kamaraju S Kusumanchi
David wrote:

> Every X days or Y reboots, Linux (on my home PC, which I boot & shut
> down 2x each day) wants to scan partitions for errors at startup.
> While this is a bit annoying (can't use the PC for 10-20 minutes), I
> usually let it finish and read a book while waiting.

shutting down 2x times each day seems to be a very inefficient way of
using/managing a desktop PC. Use "software suspend" and hibernate the
machine whenever you want to power down the machine.

Bringing up a machine from an hibernated state is faster than bringing up a
machine from a "shutdown -h now" state. Not only that, it also preserves
the state of the system.

I frequently move across different places (say work, home, lab, etc.,) and
everytime I have to change a location, I just hibernate the machine. Then I
go to the new location, then restart the machine and continue working from
where I left off. This is a really great feature. Once you get used to it,
you will think of how you managed without it for such a long time.

> 
> But at other times I want to use the PC quickly for something, and
> waiting for fsck to finish isn't an option.

Precisely. When you want to show a graph/result/chart to your boss, you
can't say "please wait for 10 minutes. My Linux machine is fscking
the /dev/hda1 partition!" :-) Just use the hibernate feature.

Now a days, the only time I do a complete reboot of my laptop is when I had
upgraded the kernel (due to a security upgrade).

hth
raju
-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2008-06-13 13:38, David wrote:
> On Fri, Jun 13, 2008 at 1:12 PM, Johannes Wiedersich
> <[EMAIL PROTECTED]> wrote:
>> read 'man tune2fs' for some tips for setting interval and mount count to
>> something that better meets your needs.
> 
> This isn't a solution for me. I want fsck to run regularly, but to
> still have a way to by-pass it when I need to.  Making fsck run less
> frequently will leave me with the same problem. eg every 100th boot I
> will still have to wait 10-20 minutes before I can start using the PC,
> which is a royal PITA.

So basically you want to have the check without having to wait for the
check to finish. I don't know, how you want this to be accomplished.
Either the check runs automatically or you have to run it manually.

>> Ctrl-C worked without problems the last time I tried on my debian lenny.
>>
> 
> I tested this on 2 Sid boxes, both had the problem. In the past (with
> Testing & Stable) hitting Ctrl-C will randomly either leave the
> partition read-only, or will re-mount it in write mode.

OK, I checked again. Ctrl-C works for /home but not for / . So, I guess
you would have to move your data to another partition. I have a rather
small / partition, so fsck is fast and I probably never have interrupted
it up to now. My /home partition is large, takes a long time to fsck and
I haven't had problems interrupting it in order to have it checked next
time. Again, since the feature works for other partitions than / , I'd
guess that there is a good reason why it isn't implemented for / .
(Maybe I'm wrong. Is there someone out there who knows better?)

>> Set your mount count and intervals apropriately for your needs. You
>> could also fsck manually (shuttdown's -F option), whenever it suits you,
>> eg. disable automatic checking and only check manually.
> 
> This is a pain. I would need to find time when I'm not using the PC,
> but still want it to be on, which is not often. I like to turn off my
> PC when I'm not using it, and to not have to wait for it when I do
> want to use it.

You cannot reliably fsck / when the computer is on. It either has to be
at boot time or else you have to boot from another / like from a rescue
CD/DVD.

>>>  - /sbin/shutdown allows the user to (any of these would help):
>>>* Force a fsck during the restart (-rF), and then to shut down the 
>>> system.
>> Does not work for me, because I want to shut down the computer
>> completely, not just waste all that power with standby mode. I.e. if you
>> want to turn off the power supply completely, shutdown is not enough,
>> YOU have to switch off manually.
>>
> 
> I think this depends on hardware. Most of my boxes shut down
> completely when I run 'shutdown -P'. But there are a few (maybe old
> kernel) which go into stand-by mode even when I really want shutdown
> to power it off.

In my experience *any* computer will be in some kind of standby mode as
long as there is no physical interruption to the power. Some power
supplies don't have a 'physical switch', but that just means that they
will always use a few watts of electricity unless you remove the cord or
put a physical switch between the box and the electrical outlet.

Are all leds of your ethernet off, when the computer is off and there is
a ethernet connection to a router? Newer hardware has some 'wake on lan'
option to boot the computer via ethernet, but of course that means that
the ethernet cards are not off, but on standby -- wasting your
electricity even if you don't want to use 'wake on lan'.

> If shutdown isn't meant to work this way, then why does it have a -P option?

The electronics can not really pull the plug or physically disconnect
from the sockets. It's like with your TV set: it will always be on
standby, if 'switched off' by the remote control. Only a physical
switch, operated by a person will really disconnect the thing from the
mains. Some consumer applications don't have these switches nowadays,
but that just means you have to pull the plug in order to fully power
off :-(

I've even seen some floor lamps that still consume a power of some 10 W
when switched off, because the transformer is still on and has not been
disconnected. Better designs have the power switch between socket and
transformer and _not_ between transformer and light bulb.

>>>  - ability for a readonly fsck on a r/w filesystem to gather info to
>>> make a later fsck on the filesystem as r/o to find and fix problems
>>> faster.
>> Do you have some technical expertise on how to implement this? I doubt
>> that the ext3 developpers overlooked that, if there was a good technical
>> solution
> 
> Might be because ext3 devs are mainly focused on servers which are
> turned on 24/7 & rarely rebooted. The kind of feature I'd like would
> be more useful for desktop users.

I guess the defaults are very conservative settings regarding
reliability of your data and were implemented at a time when there was
no journalling for d

Re: making bootup fsck more user-friendly

2008-06-13 Thread David
Hi and thanks for your reply.

On Fri, Jun 13, 2008 at 1:12 PM, Johannes Wiedersich
<[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 2008-06-13 11:25, David wrote:

[...]

> read 'man tune2fs' for some tips for setting interval and mount count to
> something that better meets your needs.

This isn't a solution for me. I want fsck to run regularly, but to
still have a way to by-pass it when I need to.  Making fsck run less
frequently will leave me with the same problem. eg every 100th boot I
will still have to wait 10-20 minutes before I can start using the PC,
which is a royal PITA.

> Ctrl-C worked without problems the last time I tried on my debian lenny.
>

I tested this on 2 Sid boxes, both had the problem. In the past (with
Testing & Stable) hitting Ctrl-C will randomly either leave the
partition read-only, or will re-mount it in write mode.

I think that in my case:

Hitting Ctrl+C breaks *both* fsck, and the script that started it
which is meant to re-mount read-write after fsck (failed or
successful)

And in your case:

Hitting Ctrl+C breaks fsck, but the calling script is not interrupted,
so it does remount the partition as read/write.

Possibly in my Sid systems, the system is more reponsive to Ctrl+C.

Which suggests another feature request for the sysvinit package:

 - Don't terminate if the user breaks fsck with Ctrl+C. The user
should hit Ctrl+C twice if he wants to stop fsck & the script which
called it (and which is supposed to remount with read/write after the
fsck).

>
> Set your mount count and intervals apropriately for your needs. You
> could also fsck manually (shuttdown's -F option), whenever it suits you,
> eg. disable automatic checking and only check manually.

This is a pain. I would need to find time when I'm not using the PC,
but still want it to be on, which is not often. I like to turn off my
PC when I'm not using it, and to not have to wait for it when I do
want to use it.

>>
>>  - /sbin/shutdown allows the user to (any of these would help):
>>* Force a fsck during the restart (-rF), and then to shut down the system.
>
> Does not work for me, because I want to shut down the computer
> completely, not just waste all that power with standby mode. I.e. if you
> want to turn off the power supply completely, shutdown is not enough,
> YOU have to switch off manually.
>

I think this depends on hardware. Most of my boxes shut down
completely when I run 'shutdown -P'. But there are a few (maybe old
kernel) which go into stand-by mode even when I really want shutdown
to power it off.

If shutdown isn't meant to work this way, then why does it have a -P option?

>
>>  - ability for a readonly fsck on a r/w filesystem to gather info to
>> make a later fsck on the filesystem as r/o to find and fix problems
>> faster.
>
> Do you have some technical expertise on how to implement this? I doubt
> that the ext3 developpers overlooked that, if there was a good technical
> solution

Might be because ext3 devs are mainly focused on servers which are
turned on 24/7 & rarely rebooted. The kind of feature I'd like would
be more useful for desktop users.

David.


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



Re: making bootup fsck more user-friendly

2008-06-13 Thread Johannes Wiedersich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2008-06-13 11:25, David wrote:
> Hi list.
> 
> I already checked this problem with Google and with my LUG, and would
> like to ask on this mailing list before I fire off a bunch of feature
> requests in the Debian BTS.
> 
> = FROM MAIL TO MY LUG =
> 
> I've tried Googling for this but haven't found much info, so asking here.
> 
> Every X days or Y reboots, Linux (on my home PC, which I boot & shut
> down 2x each day) wants to scan partitions for errors at startup.
> While this is a bit annoying (can't use the PC for 10-20 minutes), I
> usually let it finish and read a book while waiting.

read 'man tune2fs' for some tips for setting interval and mount count to
something that better meets your needs.

> But at other times I want to use the PC quickly for something, and
> waiting for fsck to finish isn't an option. The problem is, hitting
> Ctrl+C in the middle of boot fsck leaves your root partition in
> read-only mode, and the machine has a lot of boot problems, and takes
> a long time. I've tried this a few times this morning when I was in a
> hurry (reboot, ctrl+c during fsck, hit boot problems so reboot again),
> but in the end was forced to let fsck finish.

Ctrl-C worked without problems the last time I tried on my debian lenny.

> Is there a way to interrupt the bootup fsck 'cleanly', so that it will
> remount read/write, and retry the next time you boot?

Works for me on lenny.

> Even better would be a way to get fsck to run in the background after
> you're already logged into KDE. 

Does not work cleanly, because the filesystem has to be unmounted for
fsck'ing properly.

Maybe not to actually fix problems (I
> understand this is hard to do in r/w mode, while being actively used,
> for technical reasons), but at leat to flag them for the next 'real'
> fsck so they can be checked and fixed quickly then if they aren't
> bogus...
> 
> Any suggestions?

Set your mount count and intervals apropriately for your needs. You
could also fsck manually (shuttdown's -F option), whenever it suits you,
eg. disable automatic checking and only check manually.

It all depends on how important your data are and how good your backups!

There are other OSs that don't have regular automatic file system
checks. On the other hand, I've never lost any data on a linux box
without hardware defects, while I've often seen data loss on Wind0w$,
even though the hard disk still worked after a repartitioning. YMMV.

> I researched the options they mentioned, and I'm not happy with the
> situation (at least with Debian Unstable, I don't use Ubuntu).
> 
> I want to submit these feature requests, but first I'd like some
> feedback from this list before I do so:
> 
> sysvinit:
> 
>  - When it's time (during startup)to run a full fsck, give the user a
> few seconds to hit ESC before running them
> 
>  - /sbin/shutdown allows the user to (any of these would help):
>* Force a fsck during the restart (-rF), and then to shut down the system.

Does not work for me, because I want to shut down the computer
completely, not just waste all that power with standby mode. I.e. if you
want to turn off the power supply completely, shutdown is not enough,
YOU have to switch off manually.

>* Force a fsck during shutdown, after drives have been unmounted
>  + But only if an fsck is due the next time the machine boots?

Won't work, IIRC. Even the autofsck you mention checks after boot not
before shutdown.

> e2fsprogs:
> 
>  - fsck allows the user to abort cleanly with ESC (fsck will be
> retried on the next boot)

Works with Ctrl-c (the last time I tried on lenny).

>  - ability for a readonly fsck on a r/w filesystem to gather info to
> make a later fsck on the filesystem as r/o to find and fix problems
> faster.

Do you have some technical expertise on how to implement this? I doubt
that the ext3 developpers overlooked that, if there was a good technical
solution


YMMV, take care,

Johannes


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIUlYfC1NzPRl9qEURAgc3AJ9YiK7DN7ORTt+mEl3sBwWzBrFFTACfZWWn
J/0uQKq8zBaqsEJkE0T3laM=
=jY6P
-END PGP SIGNATURE-


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