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