Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Jun 2023 14:54:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 271766] dumpfs fails on geli devices: cylinder group checks failed
Message-ID:  <bug-271766-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271766

            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 l=
eads
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 erro=
r.
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 we=
ll:

# truncate -s 1G image
# mdconfig image=20
md0
# geli init -s 4096 -e aes -l 256 /dev/md0=20
Enter new passphrase:=20
Reenter new passphrase:=20

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:=20
# newfs /dev/md0.eli=20
/dev/md0.eli: 1024.0MB (2097144 sectors) block size 32768, fragment size 40=
96
        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=20
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=20=20=20
check hashes    superblock cylinder-groups inodes=20
fsmnt=20=20=20
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=
)=20
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/525ecfdad597980ea4cd59238e24c85=
30dbcd31d/lib/libufs/cgroup.c#LL248C15-L248C15


fsck cannot find any issues:

# fsck /dev/md0.eli=20
** /dev/md0.eli
** Last Mounted on=20
** 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 *****

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271766-227>