xref: /freebsd/sys/contrib/openzfs/man/man8/fsck.zfs.8 (revision 271171e0d97b88ba2a7c3bf750c9672b484c1c13)
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
9*271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
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.\"
2316038816SMartin Matuska.Dd May 26, 2021
2416038816SMartin Matuska.Dt FSCK.ZFS 8
2516038816SMartin Matuska.Os
2616038816SMartin Matuska.
2716038816SMartin Matuska.Sh NAME
2816038816SMartin Matuska.Nm fsck.zfs
2916038816SMartin Matuska.Nd dummy ZFS filesystem checker
3016038816SMartin Matuska.Sh SYNOPSIS
3116038816SMartin Matuska.Nm
3216038816SMartin Matuska.Op Ar options
3316038816SMartin Matuska.Ar dataset Ns No …
3416038816SMartin Matuska.
3516038816SMartin Matuska.Sh DESCRIPTION
3616038816SMartin Matuska.Nm
3716038816SMartin Matuskais a thin shell wrapper that at most checks the status of a dataset's container pool.
3816038816SMartin MatuskaIt is installed by OpenZFS because some Linux
3916038816SMartin Matuskadistributions expect a fsck helper for all filesystems.
4016038816SMartin Matuska.Pp
4116038816SMartin MatuskaIf more than one
4216038816SMartin Matuska.Ar dataset
4316038816SMartin Matuskais specified, each is checked in turn and the results binary-ored.
4416038816SMartin Matuska.
4516038816SMartin Matuska.Sh OPTIONS
4616038816SMartin MatuskaIgnored.
4716038816SMartin Matuska.
4816038816SMartin Matuska.Sh NOTES
4916038816SMartin MatuskaZFS datasets are checked by running
5016038816SMartin Matuska.Nm zpool Cm scrub
5116038816SMartin Matuskaon the containing pool.
5216038816SMartin MatuskaAn individual ZFS dataset is never checked independently of its pool,
5316038816SMartin Matuskawhich is unlike a regular filesystem.
5416038816SMartin Matuska.Pp
5516038816SMartin MatuskaHowever, the
5616038816SMartin Matuska.Xr fsck 8
5716038816SMartin Matuskainterface still allows it to communicate some errors: if the
5816038816SMartin Matuska.Ar dataset
5916038816SMartin Matuskais in a degraded pool, then
6016038816SMartin Matuska.Nm
613ff01b23SMartin Matuskawill return exit code
623ff01b23SMartin Matuska.Sy 4
633ff01b23SMartin Matuskato indicate an uncorrected filesystem error.
6416038816SMartin Matuska.Pp
6516038816SMartin MatuskaSimilarly, if the
6616038816SMartin Matuska.Ar dataset
6716038816SMartin Matuskais in a faulted pool and has a legacy
6816038816SMartin Matuska.Pa /etc/fstab
6916038816SMartin Matuskarecord, then
7016038816SMartin Matuska.Nm
713ff01b23SMartin Matuskawill return exit code
723ff01b23SMartin Matuska.Sy 8
733ff01b23SMartin Matuskato indicate a fatal operational error.
7416038816SMartin Matuska.Sh SEE ALSO
7516038816SMartin Matuska.Xr fstab 5 ,
7616038816SMartin Matuska.Xr fsck 8 ,
7716038816SMartin Matuska.Xr zpool-scrub 8
78