I just created an arm image with the usual steps found in https://github.com/freebsd/freebsd/blob/master/release/tools/arm.subr (cf arm_create_disk routine). After first boot, growfs does its trick and df reports the partition is taking up the full space (32 GB in my case), but still my filesystem becomes full after a few package (original arm img size was 1.5 GB). Additionally, I get hundreds of: checksum failed: cg 19, cgp: 0x0 != bp: 0x61de29e7 on every boot now.
It looks like growfs(8) wasn't properly updated in r323923. I'm guessing it should be rather easy to do, mostly copy/paste from fsck_ffs(8) code?
(In reply to Edward Tomasz Napierala from comment #1) Perhaps. I do not have time to read growfs code now, so feel free to fix this. The utility to (re)calculate the checksum is included into libufs.
A commit references this bug: Author: pho Date: Mon Oct 9 13:28:08 UTC 2017 New revision: 324428 URL: https://svnweb.freebsd.org/changeset/base/324428 Log: Added test scenario. PR: 222876 Sponsored by: Dell EMC Isilon Changes: user/pho/stress2/misc/growfs.sh
I think this is the critical bit from pass5.c, ported over to the seemingly needlessly different conventions of growfs: diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 0aa4d4586e6..99b2034aae8 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -474,6 +474,13 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag) sump[run]++; } } + + if ((sblock.fs_metackhash & CK_CYLGRP) != 0) { + acg->cg_ckhash = 0; + acg->cg_ckhash = + calculate_crc32c(~0L, (void *)newcg, fs->fs_cgsize); + } + sblock.fs_cstotal.cs_ndir += acg.cg_cs.cs_ndir; sblock.fs_cstotal.cs_nffree += acg.cg_cs.cs_nffree; sblock.fs_cstotal.cs_nbfree += acg.cg_cs.cs_nbfree;
kirk fixed this bug this morning after I sent an email yesterday asking about it... https://svnweb.freebsd.org/base?view=revision&revision=324499
Thanks guys!