HDD scan after more than 62 days

Hi,
I’m new with the Linux/OpenSuse stuff, but now I realized, that my PC dis a HDD scan at a new boot. With the upper message.

My used filesystem is EXT3.

Sorry, but I didn’t find information in the web or the documentation. Maybe I used the wrong search terms, but …

Is there any possibility to configure this? Since I do not like this behavior!

Thanx in advance
Michael

On 2008-09-16, MiniMik <MiniMik@no-mx.forums.opensuse.org> wrote:

> I’m new with the Linux/OpenSuse stuff, but now I realized, that my PC
> dis a HDD scan at a new boot. With the upper message.

At each boot, it checks to see how long ago the disk (partition, actually)
was checked. If it was longer then XX days ago, it runs a check (fsck).
By default that XX value is 60, I think.

> Is there any possibility to configure this? Since I do not like this
> behavior!

It’s possible to change the max delay between checks. You can set it to 90
days, or more. The command to do this is tune2fs.

Be very, very, VERY carefull with this kind of command.
RTFM first, and even then… (man tune2fs)

Me, I left the value as is. What’s a little check every 2 months ?


Elevators smell different to midgets

Hi,

thanx for the quick answere.
This ‘little check’ takes round about 15 minutes.

My idea would be to switch off this check completely.
Would this possible?

Thanks…

Although this mandatory check is irritating, if this check gives you no (serious) errors, you are guaranteed that your filesystem is OK. So, be patient and wait that 15 minutes, but your system is okay.

On 2008-09-16, MiniMik <MiniMik@no-mx.forums.opensuse.org> wrote:

> thanx for the quick answere.
> This ‘little check’ takes round about 15 minutes.
>
> My idea would be to switch off this check completely.
> Would this possible?

I’m not sure, I never tried that. Did you look into tune2fs’s manual page?

The check can take a while, true. But that’s because we have big disks with
lots of data, these days. So it’s work while checking them, don’t you think?

But if it really annoys you, there might be a trick. Just run a check
yourself, when you have the time. Each time you do this, the volume’s
counter will be reset to 0. If you can do this every few weeks, it will
never reach 60. No more unexpectedly fsck’s…


Elevators smell different to midgets

> My idea would be to switch off this check completely.

not a good idea, at all…it is kinda like deciding to never change
the oil in your car…or, never cleaning out the refrigerator,
ever…you can “get away with” that for a while, maybe a long
while…but, eventually you will be sorry you didn’t ‘invest’ 15
minutes every 60 days in routine maintenance…

much better is to do the check manually at the point in time that YOU
choose, short of the 60 day limit…

to me it is easier to just let SUSE count the number of days and
meditate/contemplate my navel during the check…

as usual, ymmv.


DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon

15 minutes once every 2 months is too much??? :open_mouth: This is for your own protection. (It is doing the equivalent of a “chkdsk” in Windows, except that in Windows this must be manually run by the user - which is why Windows users sometimes get the unpleasant surprise of corruption in the filesystem.)

By the way, how long it takes is a function of how large the partition is and, primarily, how full it is. While it is common these days to have monster-sized partitions, that’s really not a good idea.

mingus725 schrieb:
> 15 minutes once every 2 months is too much??? :open_mouth:

Well it depends on where inside these two months these 15 minutes fall, doesn’t it?
That’s why the hints on regaining control over when the fsck is done are so valuable.

> This is for your own protection.

Ah, how I hate that argument. I can take care of myself and I prefer to decide
myself which protection and how much of it I need, thank you very much.

> (It is doing the equivalent of a “chkdsk” in Windows, except
> that in Windows this must be manually run by the user - which is why
> Windows users sometimes get the unpleasant surprise of corruption in the
> filesystem.)

In the olden days (about 10 years ago) I used to run Unix and Linux servers for
years on end without fsck except if the system crashed, leaving the filesystems
dirty. Never had any problems except if a system crash damaged a filesystem -
which of course periodic fsck-s wouldn’t have prevented, either. And that was
before the invention of journalling filesystems which in theory have made all
that so much safer.

> By the way, how long it takes is a function of how large the partition
> is and, primarily, how full it is. While it is common these days to
> have monster-sized partitions, that’s really not a good idea.

O yeah. Don’t we all long for the good old days of 20 MB hard disks?
My first Unix server had one of these, 25 years ago, and it was divided into
several partitions, too. (Sorry, I don’t remember the layout.) But boy did it
take a lot of time to fsck after it crashed. (Which btw it did very rarely, and
usually because of a power failure rather than a system software bug.)

SCNR
T.

@Tilman -

Re-read the original post, starting with -

I’m new with the Linux/OpenSuse stuff . . .

So what gives with the uppity sarcasm? The reply wasn’t to you, anyway. You’re right, you can decide for yourself. How about letting @MiniMik do the same?

On 2008-09-17, Tilman Schmidt <t.schmidt@phoenixsoftware.de> wrote:

> In the olden days (about 10 years ago) I used to run Unix and Linux servers for
> years on end without fsck except if the system crashed, leaving the filesystems
> dirty. Never had any problems except if a system crash damaged a filesystem -
> which of course periodic fsck-s wouldn’t have prevented, either. And that was
> before the invention of journalling filesystems which in theory have made all
> that so much safer.

Well, if the OP’s machine was kept on, the check would never have been run.
I’m sure in the ‘olden’ days, that rule was active on your servers, too. But
since they were kept running…

Actually, that’s why these rules can be a bit irritating; they have been
written for servers. There’s 2 triggers, I think: days since last check, and
number of boot since last check. That doesn’t really apply to a desktop, or
even worse, a laptop.

Makes sense for a server:

  1. Booting a server is not something you do on a regular base, so why not
    check while we’re at it? (except if that check has allready been done less
    than 60 days ago.)
  2. If a server has been booted more than X times, since last check, that
    could be sign of a problem. So better check the FS.

Of course, we’d all prefer to start these things when WE want them to run.

To the OP: if you want to avod all such checks, use ReiserFS.

Me, I don’t use ReiserFS. It’s a hog. I prefer the fsck’s.


Elevators smell different to midgets

Sorry to drag this out even further, but …
Rikishi42 schrieb:
> On 2008-09-17, Tilman Schmidt <t.schmidt@phoenixsoftware.de> wrote:
>
>> In the olden days (about 10 years ago) I used to run Unix and Linux servers for
>> years on end without fsck except if the system crashed, leaving the filesystems
>> dirty. Never had any problems except if a system crash damaged a filesystem -
>> which of course periodic fsck-s wouldn’t have prevented, either. And that was
>> before the invention of journalling filesystems which in theory have made all
>> that so much safer.
>
> Well, if the OP’s machine was kept on, the check would never have been run.
> I’m sure in the ‘olden’ days, that rule was active on your servers, too. But
> since they were kept running…

Um, no. In those days, there was no such rule. It’s a rather recent invention.
(“Recent” as in “single-digit number of years ago”.)

> Makes sense for a server:
> 1. Booting a server is not something you do on a regular base, so why not
> check while we’re at it? (except if that check has allready been done less
> than 60 days ago.)
> 2. If a server has been booted more than X times, since last check, that
> could be sign of a problem. So better check the FS.

I beg to differ. If I reboot a server, it’s either for a planned downtime,
in which case I plan for an fsck too, but I do it manually - or for an
emergency when I have an interest in getting the machine up and running
again as quickly as possible, in which case it is absolutely horrible if the
system suddenly decides all of its own that it would like to spend an
additional quarter of an hour checking the filesystem just in case. So that
automatic fsck thing really only makes sense for a workstation where an
additional 15 minutes of boot time causes nothing worse than annoyance for
the user.

T.

mingus725 schrieb:
> @Tilman -
>
> Re-read the original post, starting with -
>
>> I’m new with the Linux/OpenSuse stuff . . .

Why? I know that text already, and was in fact referring to it.

> So what gives with the uppity sarcasm?

None of what I wrote was in any way sarcastic. It was a straightforward,
serious contribution to the discussion.

> The reply wasn’t to you, anyway.

You wrote in a public forum. You’ll have to live with replies from all the
participants.

> You’re right, you can decide for yourself. How about letting
> @MiniMik do the same?

That’s the whole point of this thread, isn’t it? Neither Michael (MiniMik)
nor I can decide for ourselves. The system decides for us, and you defend
it. Michael asked how to configure it, ie. he wanted to decide for himself.
Did he get an answer that would actually allow him to decide for himself?
No, he didn’t. All the replies he got were “not a good idea”, “it’s for your
own protection”, “just be patient”, “15 minutes are not too much for your
safety”, IOW: don’t decide for yourself, accept the decision the system has
taken for you.

How does that square with your request that I let him decide for himself?

T.

Tilman Schmidt wrote:
> Michael asked how to configure it, ie. he wanted to decide for himself.
> Did he get an answer that would actually allow him to decide for himself?
> No, he didn’t. All the replies he got were “not a good idea”, “it’s for your
> own protection”, “just be patient”, “15 minutes are not too much for your
> safety”, IOW: don’t decide for yourself, accept the decision the system has
> taken for you.

that is not correct, the first answer he received (at 09/16/08 10:50
AM [here], from Rikishi42, just 84 minutes after MiniMik’s question)
answered his question FULLY telling him to change the default using
tune2fs…

then TWO days later (09/18/200/ 12:14 AM) you johnny-come-lately in
bickering about the answers given…but, didn’t bother to answer
yourself nor add anything to the discussion (unless you think telling
us you ran a Unix server 25 years ago with a 20 MB drive somehow
helps MiniMik!)


DenverD (Linux Counter 282315) via NNTP, Thunderbird 2.0.0.14, KDE
3.5.7, SUSE Linux 10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon

Hmm, I thought I would brush up my rusty Perl and write a little program that lets you know if a check will happen next reboot so that you can preemptively do the fsck. This only works for ext2/3 due to the call to tune2fs. Here it is, have fun, I did.

#!/usr/bin/perl -w

# warne2fsck: Warn if an e2fsck is coming up next boot
# Run as root: warne2fsck <partition>
# Copyright Ken Yap 2008, GPLv2

use Date::Manip;

my $fs = $ARGV[0] or die "$0 partition
";
open(I, "/sbin/tune2fs -l $fs |") or die "Cannot run tune2fs
";
# we lose the first line due to this EOF check
# but we don't need this line anyway.
$_ = <I>;
exit (0) if (eof(I));   # probably no permission, tune2fs will explain
my ($mcount, $maxmount, $nextcheck);
while (<I>) {
        chomp($_);
        if (/^Mount count:/) {
                (undef, $mcount) = split(/:\s+/, $_);
        } elsif (/^Maximum mount count:/) {
                (undef, $maxmount) = split(/:\s+/, $_);
        } elsif (/^Next check after:/) {
                (undef, $nextcheck) = split(/:\s+/, $_);
        }
}
if ($mcount ge $maxmount) {
        print "Warning: mcount=$mcount >= maxmount=$maxmount, next boot will do forced fsck
";
}
if (UnixDate($nextcheck, "%s") < time()) {
        print "Warning: nextcheck=$nextcheck in past, next boot will do forced fsck
";
}
exit(0);

@Tilman -

If I misunderstood your post, I apologize. IMHO, it came across as rather preachy and condescending.

Let’s just steal a line from that great old movie . . . “what we have here is a failure to communicate”, and let it go at that. :slight_smile: