From owner-svn-src-stable@FreeBSD.ORG Sat Dec 6 13:45:37 2008 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2F4A1065676; Sat, 6 Dec 2008 13:45:37 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0EB18FC12; Sat, 6 Dec 2008 13:45:37 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB6DjbSE095775; Sat, 6 Dec 2008 13:45:37 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB6Djb5H095774; Sat, 6 Dec 2008 13:45:37 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200812061345.mB6Djb5H095774@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 6 Dec 2008 13:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185702 - stable/7/share/man/man5 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2008 13:45:38 -0000 Author: keramida (doc committer) Date: Sat Dec 6 13:45:37 2008 New Revision: 185702 URL: http://svn.freebsd.org/changeset/base/185702 Log: MFC: r172623, r175681, r176182, r176184, and r185217 * Document quotachecks use of the passno field. * Explain how the passno field in /etc/fstab works with fsck and quotacheck in some more detail. * Explain in more detail how the pass number field works. * Remove information about block devices; we don't have this sort of separation between character and block devices anymore. * Enhance the explanation of using filesystem-specific mount options, and add a mount_msdosfs example. Approved by: re (kib) Modified: stable/7/share/man/man5/ (props changed) stable/7/share/man/man5/fstab.5 Modified: stable/7/share/man/man5/fstab.5 ============================================================================== --- stable/7/share/man/man5/fstab.5 Sat Dec 6 13:44:09 2008 (r185701) +++ stable/7/share/man/man5/fstab.5 Sat Dec 6 13:45:37 2008 (r185702) @@ -32,7 +32,7 @@ .\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd November 23, 2008 .Dt FSTAB 5 .Os .Sh NAME @@ -64,15 +64,8 @@ doing their thing. .Pp The first field, .Pq Fa fs_spec , -describes the block special device or +describes the special device or remote file system to be mounted. -For file systems of type -.Em ufs , -the special file name is the block special file name, -and not the character special file name. -If a program needs the character special file name, -the program must create it by appending a ``r'' after the -last ``/'' in the special file name. .Pp The second field, .Pq Fa fs_file , @@ -98,8 +91,7 @@ describes the mount options associated w It is formatted as a comma separated list of options. It contains at least the type of mount (see .Fa fs_type -below) plus any additional options -appropriate to the file system type. +below) plus any additional options appropriate to the file system type. See the options flag .Pq Fl o in the @@ -107,6 +99,32 @@ in the page and the file system specific page, such as .Xr mount_nfs 8 , for additional options that may be specified. +All options that can be given to the file system specific mount commands +can be used in +.Nm +as well. +They just need to be formatted a bit differently. +The arguments of the +.Fl o +option can be used without the preceding +.Fl o +flag. +Other options need both the file system specific flag and its argument, +separated by an equal sign. +For example, mounting an +.Xr msdosfs 5 +filesystem, the options +.Bd -literal -offset indent +-o sync -o noatime -m 644 -M 755 -u foo -g bar +.Ed +.Pp +should be written as +.Bd -literal -offset indent +sync,noatime,-m=644,-M=755,-u=foo,-g=bar +.Ed +.Pp +in the option field of +.Nm . .Pp If the options ``userquota'' and/or ``groupquota'' are specified, the file system is automatically processed by the @@ -186,20 +204,72 @@ The sixth field, .Pq Fa fs_passno , is used by the .Xr fsck 8 -program to determine the order in which file system checks are done -at reboot time. +and +.Xr quotacheck 8 +programs to determine the order in which file system and quota +checks are done at reboot time. +The +.Fa fs_passno +field can be any value between 0 and +.Ql INT_MAX Ns -1 . +.Pp The root file system should be specified with a .Fa fs_passno of 1, and other file systems should have a .Fa fs_passno -of 2. -File systems within a drive will be checked sequentially, +of 2 or greater. +A file system with a +.Fa fs_passno +value of 1 is always checked sequentially and be completed before +another file system is processed, and it will be processed before +all file systems with a larger +.Fa fs_passno . +.Pp +For any given value of +.Fa fs_passno , +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 hardware. +Once all file system checks are complete for the current +.Fa fs_passno , +the same process will start over for the next +.Fa fs_passno . +.Pp If the sixth field is not present or is zero, a value of zero is returned and .Xr fsck 8 +and +.Xr quotacheck 8 will assume that the file system does not need to be checked. +.Pp +The +.Fa fs_passno +field can be used to implement finer control when +the system utilities may determine that the file system resides +on a different physical device, when it actually does not, as with a +.Xr ccd 4 +device. +All file systems with a lower +.Fa fs_passno +value will be completed before starting on file systems with a +higher +.Fa fs_passno +value. +E.g. all file systems with a +.Fa fs_passno +of 2 will be completed before any file systems with a +.Fa fs_passno +of 3 or greater are started. +Gaps are allowed between the different +.Fa fs_passno +values. +E.g. file systems listed in +.Pa /etc/fstab +may have +.Fa fs_passno +values such as 0, 1, 2, 15, 100, 200, 300, and may appear in any order +within +.Pa /etc/fstab . .Bd -literal #define FSTAB_RW "rw" /* read/write device */ #define FSTAB_RQ "rq" /* read/write with quotas */ @@ -237,6 +307,7 @@ resides in .Sh SEE ALSO .Xr getfsent 3 , .Xr getvfsbyname 3 , +.Xr ccd 4 , .Xr dump 8 , .Xr fsck 8 , .Xr mount 8 ,