fsck with noauto

Jorge Almeida jjalmeida at gmail.com
Sat Feb 26 05:52:47 PST 2011


On Sat, Feb 26, 2011 at 12:28 PM, David A. Bandel
<david.bandel at gmail.com> wrote:
> On Sat, Feb 26, 2011 at 04:17, Jorge Almeida <jjalmeida at gmail.com> wrote:

>
> Since the sixth field tells the order of fsck, if you have a disk not
> powered up or not connected at boot, it should have 0.  If you want to
> modify the default fsck times (# of mounts or days since last fsck)
> use tune2fs.  Normally, something like 30 mounts or 180 days is the
> default.  But you can change it.  As you said, setting value 2 is not
> good if the drive is not available -- the system will sit and wait for
> it.  noauto means the drive isn't available until you mount it.
>

Right. I reverted fstab to the previous "0 0" state and gave up
automatic checking. But I still have to find out how to do it manually
(that is, which options to pass to fsck?)

>>
>> So, what strategy is best in such cases? I could cook up a script to
>> be used instead of "mount" that would do the checking and then do the
>> mounting. How can I find out what command+options are called by fstab
>> with "0 2"?
>
> man 5 fstab
>
> with noauto, use 0 in field 6 and change the fsck behavior using tune2fs.
>

I had read the man page. It doesn't  say how it does the checking, it
just says when.
Tuning the behaviour is not the issue, I'm assuming that the defaults
(corresponding to "0 2") are good enough. I just don't know what the
defaults are.
In other words, I would like to know how to do manually what fstab
does automatically.

TNX

Jorge




More information about the Linux-users mailing list