xref: /freebsd/sys/contrib/openzfs/man/man8/fsck.zfs.8 (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1.\" SPDX-License-Identifier: CDDL-1.0
2.\"
3.\" CDDL HEADER START
4.\"
5.\" The contents of this file are subject to the terms of the
6.\" Common Development and Distribution License (the "License").
7.\" You may not use this file except in compliance with the License.
8.\"
9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10.\" or https://opensource.org/licenses/CDDL-1.0.
11.\" See the License for the specific language governing permissions
12.\" and limitations under the License.
13.\"
14.\" When distributing Covered Code, include this CDDL HEADER in each
15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16.\" If applicable, add the following below this CDDL HEADER, with the
17.\" fields enclosed by brackets "[]" replaced with your own identifying
18.\" information: Portions Copyright [yyyy] [name of copyright owner]
19.\"
20.\" CDDL HEADER END
21.\"
22.\" Copyright 2013 Darik Horn <dajhorn@vanadac.com>. All rights reserved.
23.\"
24.Dd May 26, 2021
25.Dt FSCK.ZFS 8
26.Os
27.
28.Sh NAME
29.Nm fsck.zfs
30.Nd dummy ZFS filesystem checker
31.Sh SYNOPSIS
32.Nm
33.Op Ar options
34.Ar dataset Ns No …
35.
36.Sh DESCRIPTION
37.Nm
38is a thin shell wrapper that at most checks the status of a dataset's container
39pool.
40It is installed by OpenZFS because some Linux
41distributions expect a fsck helper for all filesystems.
42.Pp
43If more than one
44.Ar dataset
45is specified, each is checked in turn and the results binary-ored.
46.
47.Sh OPTIONS
48Ignored.
49.
50.Sh NOTES
51ZFS datasets are checked by running
52.Nm zpool Cm scrub
53on the containing pool.
54An individual ZFS dataset is never checked independently of its pool,
55which is unlike a regular filesystem.
56.Pp
57However, the
58.Xr fsck 8
59interface still allows it to communicate some errors: if the
60.Ar dataset
61is in a degraded pool, then
62.Nm
63will return exit code
64.Sy 4
65to indicate an uncorrected filesystem error.
66.Pp
67Similarly, if the
68.Ar dataset
69is in a faulted pool and has a legacy
70.Pa /etc/fstab
71record, then
72.Nm
73will return exit code
74.Sy 8
75to indicate a fatal operational error.
76.Sh SEE ALSO
77.Xr fstab 5 ,
78.Xr fsck 8 ,
79.Xr zpool-scrub 8
80