fsck with noauto

David A. Bandel david.bandel at gmail.com
Sat Feb 26 04:28:23 PST 2011


On Sat, Feb 26, 2011 at 04:17, Jorge Almeida <jjalmeida at gmail.com> wrote:
> This list has been mighty quiet.
>
> Well, I could use your know-how. I have an external IDE disk, used for
> backups. It has two partitions with ext2 fs. I have "noauto,user     0
> 0" in the corresponding entries in /etc/fstab. Of course, this means
> that  fsck'ing is not made automatically. Changing "0 0" to "0 2" has
> the effect that the system doesn't enter multiuser mode, as the disk
> is not powered up.

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.

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

Ciao,

David A. Bandel
-- 
Focus on the dream, not the competition.
            - Nemesis Air Racing Team motto
Visit my web page at: http://david.bandel.us/




More information about the Linux-users mailing list