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

Re: making bootup fsck more user-friendly



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
<johannes@physik.blm.tu-muenchen.de> 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
>> <johannes@physik.blm.tu-muenchen.de> 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 unless you remove the cord or
> put a physical switch between the box and the electrical outlet.

Thanks for the info. I thought that ACPI power supplies did a better
job, and drew zero power, unless it was requested in the BIOS for some
reason (eg: wake on lan).

>
> As I said before, it depends on the importance of the data and quality,
> frequency and reliability of your backups. Another point to consider is
> how quick you have to recover, etc.

I do have reasonably good backups. I'm willing to let the system do
all it thinks is needed to keep the disks healthy, *except* when it is
a major inconvenience to me :-)

==========

On Fri, Jun 13, 2008 at 5:11 PM, Kamaraju S Kusumanchi
<kamaraju@bluebottle.com> 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.
>
> shutting down 2x times each day seems to be a very inefficient way of
> using/managing a desktop PC.

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.

> Use "software suspend" and hibernate the
> machine whenever you want to power down the machine.

I don't see a hibernate option in my KDE Log Out dialog box. What is
the easiest way to set it up?

I've read about a 'hibernate' package for Debian, but I haven't
experimented with it yet. Mainly because my system boots up in about
30 seconds (most of the time) so I don't care :-) Also I've read that
hibernate can make your system unstable. I do have a few pieces of
hardware with proprietary drivers (video & wireless network card), so
I don't want to risk it if I don't need to :-)

Also, doesn't this mean you very rarely run fsck on your system?
(another poster mentioned this too).

==========

On Fri, Jun 13, 2008 at 6:54 PM, Douglas A. Tutty <dtutty@porchlight.ca> 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 :-)

==========

>>
>> 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.
>

This is exactly what I meant.

> 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.
>

I could, and I probably will at some point. But I'm lazy, and can wait
for it to be added to sysvinit if it's a worthy feature request :-)

==========

On Sat, Jun 14, 2008 at 1:57 AM, Douglas A. Tutty <dtutty@porchlight.ca> 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.
>

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?

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).

Also, that hour-long scan needs to be cleanly interruptible. Ctrl+C or
ESC needs to do the right thing.

David.


Reply to: