[Bug 271766] dumpfs fails on geli devices: cylinder group checks failed
Date: Thu, 01 Jun 2023 14:54:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766
Bug ID: 271766
Summary: dumpfs fails on geli devices: cylinder group checks
failed
Product: Base System
Version: 13.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: bevan@bi-co.net
Running dumpfs on a UFS2 file system in a block device encrypted via geli leads
to the following error message when attempting to list free fragments:
dumpfs: /dev/md0.eli: cylinder group checks failed
"dumpfs -s" works without issues. "dumpfs -f" immediately triggers the error.
I'm running FreeBSD 13.2-RELEASE.
Here are instructions that should easily reproduce the issue. I'm using md here
only for easy reproducibility. The error occurs on actual hard drives as well:
# truncate -s 1G image
# mdconfig image
md0
# geli init -s 4096 -e aes -l 256 /dev/md0
Enter new passphrase:
Reenter new passphrase:
Metadata backup for provider /dev/md0 can be found in /var/backups/md0.eli
and can be restored with the following command:
# geli restore /var/backups/md0.eli /dev/md0
# geli attach /dev/md0
Enter passphrase:
# newfs /dev/md0.eli
/dev/md0.eli: 1024.0MB (2097144 sectors) block size 32768, fragment size 4096
using 4 cylinder groups of 256.00MB, 8192 blks, 32768 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 524480, 1048768, 1573056
# dumpfs /dev/md0.eli
magic 19540119 (UFS2)
last mounted time Thu Jan 1 01:00:00 1970
last modified time Thu Jun 1 16:39:30 2023
superblock location 65536 id [ 6478ada2 7c30d5d9 ]
ncg 4 size 262143 blocks 253862
bsize 32768 shift 15 mask 0xffff8000
fsize 4096 shift 12 mask 0xfffff000
frag 8 shift 3 fsbtodb 3
minfree 8% optim time symlinklen 120
maxbsize 32768 maxbpg 4096 maxcontig 32 contigsumsize 16
nbfree 31729 ndir 2 nifree 131068 nffree 28
bpg 8192 fpg 65536 ipg 32768 unrefs 0
nindir 4096 inopb 128 maxfilesize 2252349704110079
sbsize 4096 cgsize 16384 csaddr 2088 cssize 4096
sblkno 24 cblkno 32 iblkno 40 dblkno 2088
cgrotor 0 fmod 0 ronly 0 clean 1
metaspace 2616 avgfpdir 64 avgfilesize 16384
flags
check hashes superblock cylinder-groups inodes
fsmnt
volname swuid 0 providersize 262143
cs[].cs_(nbfree,ndir,nifree,nffree):
(7928,2,32764,21) (7934,0,32768,0) (7934,0,32768,0) (7933,0,32768,7)
blocks in last group 8191
dumpfs: /dev/md0.eli: cylinder group checks failed
I think it is this check that triggers the error:
https://github.com/freebsd/freebsd-src/blob/525ecfdad597980ea4cd59238e24c8530dbcd31d/lib/libufs/cgroup.c#LL248C15-L248C15
fsck cannot find any issues:
# fsck /dev/md0.eli
** /dev/md0.eli
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 253860 free (28 frags, 31729 blocks, 0.0% fragmentation)
***** FILE SYSTEM IS CLEAN *****
--
You are receiving this mail because:
You are the assignee for the bug.