ZFS fstyp(8) returns filesystem not recognised for zfs.

Yup, you're right. Just verified that on 12-2-RELEASE-p6. Someone should file a PR ... in their copious spare time. Maybe there is already one?
See below, covecat explained it: This is working as intended.
 
manpage says it needs -u to recognize zfs (and it works)
Code:
$fstyp -u  /dev/da0p3
zfs
$fstyp  /dev/da0p3
fstyp: /dev/da0p3: filesystem not recognized
tested 12.2 and 11.4
 
No it does not,
23068712 314572800 ada2p3 freebsd-zfs (150G)
fstyp -u /dev/ada2p3
fstyp: /dev/ada2p3: filesystem not recognized
 
root@aladin:/home/x # zpool list -v
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
ZT 149G 17.6G 131G - - 1% 11% 1.00x ONLINE -
ada2p3 149G 17.6G 131G - - 1% 11.8% - ONLINE
root@aladin:/home/x # fstyp -u ada2p3
fstyp: ada2p3: No such file or directory
root@aladin:/home/x # fstyp -u /dev/ada2p3
fstyp: /dev/ada2p3: filesystem not recognized
root@aladin:/home/x #
 
Doesn't work here either on 13.0 although my filesystem is older than that release. I remember this used to work on 12.2, so there is definitely a regression somewhere.
 
Makefile in /usr/src/usr.sbin/fstyp is borked in 13
Code:
--- Makefile.orig    2021-05-04 21:08:06.126728000 +0300
+++ Makefile    2021-05-04 21:02:50.859873000 +0300
@@ -29,6 +29,7 @@
 IGNORE_PRAGMA=  YES
 
 WARNS?=    0
+CFLAGS+=  -DHAVE_ZFS
because of the missing define the ID code is never called
 
Back
Top