Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Nov 2007 22:11:36 +0300
From:      Boris Samorodov <bsam@ipt.ru>
To:        Christopher Key <cjk32@cam.ac.uk>
Cc:        questions@freebsd.org
Subject:   Re: fsck and memory filesytems (fsck_mfs: No such file or directory)
Message-ID:  <17766375@srv.sem.ipt.ru>
In-Reply-To: <472F66E7.2070103@cam.ac.uk> (Christopher Key's message of "Mon\, 05 Nov 2007 18\:54\:31 %2B0000")
References:  <472F4C16.5020406@cam.ac.uk> <99846340@srv.sem.ipt.ru> <472F66E7.2070103@cam.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 05 Nov 2007 18:54:31 +0000 Christopher Key wrote:
> Boris Samorodov wrote:
> > On Mon, 05 Nov 2007 17:00:06 +0000 Christopher Key wrote:
> >
> >> # cat /etc/fstab
> >> # Device                Mountpoint      FStype  Options         Dump
> >> Pass#
> >> /dev/ad8s1b             none            swap    sw              0       0
> >> /dev/ad8s1a             /               ufs     rw              1       1
> >> md                      /tmp            mfs     rw,-s64m
> >> 2      2
> >>     
> >         ^^^ [1]
> >
> >   
> >> /dev/ad8s1f             /usr            ufs     rw              2       2
> >> /dev/ad8s1e             /var            ufs     rw              2       2
> >> /dev/ad8s1d             /var/tmp        ufs     rw              3       3
> >>     
> >                                                                  ^^^^^^^^^^ [2]
> >   
> >> /dev/mirror/gm0s1d      /svn            ufs     rw              2       2
> >> /dev/mirror/gm0s2d      /data           ufs     rw              2       2
> >> /dev/mirror/gm0s3d      /music          ufs     rw              2       2
> >   
> >> I can get the system to boot quite happily by carrying on into single
> >> user mode and exiting, but I still get the same behaviour next reboot.
> >   
> >> Does anyone have any suggestions?
> >
> > [1] According to man(5) fstab:
> > -----
> >      The sixth field, (fs_passno), is used by the fsck(8) program to determine
> >      the order in which file system checks are done at reboot time.  The root
> >      file system should be specified with a fs_passno of 1, and other file
> >      systems should have a fs_passno of 2.  File systems within a drive will
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >      be checked sequentially, but file systems on different drives will be
         ^^^^^^^^^^^^^^^^^^^^^^^  [*]
> >      checked at the same time to utilize parallelism available in the hard-
> >      ware.  If the sixth field is not present or is zero, a value of zero is
> >      returned and fsck(8) will assume that the file system does not need to be
> >      checked.
> > -----
> >
> > Seems that you need to use "0" istead of "2". I'd say the same for the
> > fifth field here.
> >
> > BTW, I can't find what does [2] mean (the values "3" here)...
> >   
> Thanks Boris, Daniel,

> Setting the pass# to 0 for /tmp worked perfectly.

> The reason for having a pass# of 3 for /var/tmp was, to put it
> succinctly, because it was mounted within a filesystem with a pass# of
> 2.

> My understanding was that the fsck didn't start to check a filesystem
> with a pass# of n+1 until it had successfully checked all those with a
> pass# of n.  I expected that you would always want to make sure that,
> before checking some filesystem, you ensured that its mount point was
> valid first, and hence gave it a greater pass# that the filesystem in
> which it gets mounted.  Hence / having a pass# of 1, and /usr/ var etc
> having a pass# of 2.

> If anyone knows otherwise, I'd appreciate the correction.

Let me point to the same lines of man(5) fstab. Please look at [*].
Sequentally (as one writes at a /etc/fstab file) within a drive, just
it.


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17766375>