19a317438SAdrian Chadd.\" $NetBSD: fsck.8,v 1.19 1999/03/10 00:08:33 erh Exp $ 29a317438SAdrian Chadd.\" $FreeBSD$ 39a317438SAdrian Chadd.\" 49a317438SAdrian Chadd.\" Copyright (c) 1996 Christos Zoulas. All rights reserved. 59a317438SAdrian Chadd.\" 69a317438SAdrian Chadd.\" Redistribution and use in source and binary forms, with or without 79a317438SAdrian Chadd.\" modification, are permitted provided that the following conditions 89a317438SAdrian Chadd.\" are met: 99a317438SAdrian Chadd.\" 1. Redistributions of source code must retain the above copyright 109a317438SAdrian Chadd.\" notice, this list of conditions and the following disclaimer. 119a317438SAdrian Chadd.\" 2. Redistributions in binary form must reproduce the above copyright 129a317438SAdrian Chadd.\" notice, this list of conditions and the following disclaimer in the 139a317438SAdrian Chadd.\" documentation and/or other materials provided with the distribution. 149a317438SAdrian Chadd.\" 3. All advertising materials mentioning features or use of this software 159a317438SAdrian Chadd.\" must display the following acknowledgement: 169a317438SAdrian Chadd.\" This product includes software developed by Christos Zoulas. 179a317438SAdrian Chadd.\" 4. The name of the author may not be used to endorse or promote products 189a317438SAdrian Chadd.\" derived from this software without specific prior written permission. 199a317438SAdrian Chadd.\" 209a317438SAdrian Chadd.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 219a317438SAdrian Chadd.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 229a317438SAdrian Chadd.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 239a317438SAdrian Chadd.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 249a317438SAdrian Chadd.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 259a317438SAdrian Chadd.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 269a317438SAdrian Chadd.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 279a317438SAdrian Chadd.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 289a317438SAdrian Chadd.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 299a317438SAdrian Chadd.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 309a317438SAdrian Chadd.\" 319a317438SAdrian Chadd.Dd September 23, 1996 329a317438SAdrian Chadd.Dt FSCK 8 339a317438SAdrian Chadd.Os NetBSD 1 349a317438SAdrian Chadd.Sh NAME 359a317438SAdrian Chadd.Nm fsck 369a317438SAdrian Chadd.Nd file system consistency check and interactive repair 379a317438SAdrian Chadd.Sh SYNOPSIS 389a317438SAdrian Chadd.Nm "" 399a317438SAdrian Chadd.Op Fl dvplfyn 409a317438SAdrian Chadd.Op Fl l Ar maxparallel 419a317438SAdrian Chadd.Op Fl t Ar fstype 429a317438SAdrian Chadd.Op Fl T Ar fstype:fsoptions 439a317438SAdrian Chadd.Op special | node ... 449a317438SAdrian Chadd.Sh DESCRIPTION 459a317438SAdrian ChaddThe 469a317438SAdrian Chadd.Nm 479a317438SAdrian Chaddcommand invokes filesystem-specific programs to check 489a317438SAdrian Chaddthe special devices listed in the 499a317438SAdrian Chadd.Xr fstab 5 509a317438SAdrian Chaddfile or in the command line for consistency. 519a317438SAdrian Chadd.Pp 529a317438SAdrian ChaddIt is normally used in the script 539a317438SAdrian Chadd.Pa /etc/rc 549a317438SAdrian Chaddduring automatic reboot. 559a317438SAdrian ChaddIf no filesystems are specified, and ``preen'' mode is enabled ( 569a317438SAdrian Chadd.Fl p 579a317438SAdrian Chaddoption) 589a317438SAdrian Chadd.Nm 599a317438SAdrian Chaddreads the table 609a317438SAdrian Chadd.Pa /etc/fstab 619a317438SAdrian Chaddto determine which filesystems to check. 629a317438SAdrian ChaddOnly partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro'' 639a317438SAdrian Chaddand that have non-zero pass number are checked. 649a317438SAdrian ChaddFilesystems with pass number 1 (normally just the root filesystem) 659a317438SAdrian Chaddare checked one at a time. 669a317438SAdrian ChaddWhen pass 1 completes, all remaining filesystems are checked, 679a317438SAdrian Chaddrunning one process per disk drive. 689a317438SAdrian ChaddThe disk drive containing each filesystem is inferred from the longest prefix 699a317438SAdrian Chaddof the device name that ends in a digit; the remaining characters are assumed 709a317438SAdrian Chaddto be the partition designator. 719a317438SAdrian Chadd.Pp 729a317438SAdrian ChaddThe options are as follows: 739a317438SAdrian Chadd.Bl -tag -width indent 749a317438SAdrian Chadd.It Fl d 759a317438SAdrian ChaddDebugging mode. Just print the commands without executing them. Available 769a317438SAdrian Chaddonly if 779a317438SAdrian Chadd.Nm 789a317438SAdrian Chaddis compiled to support it. 799a317438SAdrian Chadd.It Fl f 809a317438SAdrian ChaddForce checking of filesystems, even when they are marked clean (for filesystems 819a317438SAdrian Chaddthat support this). 829a317438SAdrian Chadd.It Fl l Ar maxparallel 839a317438SAdrian ChaddLimit the number of parallel checks to the number specified in 849a317438SAdrian Chaddthe following argument. By default, the limit is the number of 859a317438SAdrian Chadddisks, running one process per disk. If a smaller limit is giv- 869a317438SAdrian Chadden, the disks are checked round-robin, one filesystem at a time. 879a317438SAdrian Chadd.It Fl n 889a317438SAdrian ChaddCauses 899a317438SAdrian Chadd.Nm 909a317438SAdrian Chaddto assume no as the answer to all operator questions, except "CONTINUE?". 919a317438SAdrian Chadd.It Fl p 929a317438SAdrian ChaddEnter preen mode. 939a317438SAdrian Chadd.It Fl t Ar fstype 949a317438SAdrian ChaddInvoke 959a317438SAdrian Chadd.Nm 969a317438SAdrian Chaddonly for the comma separated list of filesystem types. If the 979a317438SAdrian Chaddlist starts with 989a317438SAdrian Chadd.Dq no 999a317438SAdrian Chaddthen invoke 1009a317438SAdrian Chadd.Nm 1019a317438SAdrian Chaddfor the filesystem types that are not specified in the list. 1029a317438SAdrian Chadd.It Fl v 1039a317438SAdrian ChaddPrint the commands before executing them. 1049a317438SAdrian Chadd.It Fl y 1059a317438SAdrian ChaddCauses 1069a317438SAdrian Chadd.Nm 1079a317438SAdrian Chaddto assume yes 1089a317438SAdrian Chaddas the answer to all operator questions. 1099a317438SAdrian Chadd.It Fl T Ar fstype:fsoptions 1109a317438SAdrian ChaddList of comma separated file system specific options for the specified 1119a317438SAdrian Chaddfile system type, in the same format as 1129a317438SAdrian Chadd.Xr mount 8 . 1139a317438SAdrian Chadd.El 1149a317438SAdrian Chadd.Sh FILES 1159a317438SAdrian Chadd.Bl -tag -width /etc/fstab -compact 1169a317438SAdrian Chadd.It Pa /etc/fstab 1179a317438SAdrian Chaddfile system table 1189a317438SAdrian Chadd.El 1199a317438SAdrian Chadd.Sh SEE ALSO 1209a317438SAdrian Chadd.Xr mount 8 , 1219a317438SAdrian Chadd.Xr fstab 5 , 1229a317438SAdrian Chadd.Xr fsck_msdos 8 , 1239a317438SAdrian Chadd.Xr fsck_ffs 8 124