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