[Bug 260962] fsck.zfs(8) does not detect OpenZFS pool degradation

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 05 Jan 2022 20:39:38 UTC

            Bug ID: 260962
           Summary: fsck.zfs(8) does not detect OpenZFS pool degradation
           Product: Base System
           Version: CURRENT
          Hardware: Any
               URL: https://cgit.freebsd.org/src/commit/sys/contrib/openzf
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: grahamperrin@gmail.com


Maybe not a bug, but what's below is not consistent with the installed manual


root@mowa219-gjp4-8570p-freebsd:~ # zfs --version
root@mowa219-gjp4-8570p-freebsd:~ # /usr/local/sbin/fsck.zfs
root@mowa219-gjp4-8570p-freebsd:~ # zpool status -x
  pool: Transcend
 state: ONLINE
status: One or more devices could not be opened.  Sufficient replicas exist for
        the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-2Q
  scan: scrub repaired 0B in 01:32:30 with 0 errors on Sun Dec 12 16:25:35 2021

        NAME                   STATE     READ WRITE CKSUM
        Transcend              ONLINE       0     0     0
          gpt/Transcend        ONLINE       0     0     0
          gpt/cache-transcend  UNAVAIL      0     0     0  cannot open

errors: No known data errors
root@mowa219-gjp4-8570p-freebsd:~ # date ; uname -aKU
Wed Jan  5 20:36:28 GMT 2022
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #118
main-n251923-4bae154fe8c: Sat Dec 25 08:03:37 GMT 2021    
 amd64 1400045 1400045
root@mowa219-gjp4-8570p-freebsd:~ # 


From    man 8 fsck.zfs

> … checks the status of a dataset's container pool.  It is installed 
> by OpenZFS because some Linux distributions expect a fsck helper for 
> all filesystems. …

> … if the dataset is in a degraded pool, then fsck.zfs will return 
> exit code 4 to indicate an uncorrected filesystem error. …

You are receiving this mail because:
You are the assignee for the bug.