Subject: kern/30525: remounting ffs read-only (mount -ur) does not sync metadata
To: None <firstname.lastname@example.org, email@example.com,>
From: None <firstname.lastname@example.org>
Date: 06/14/2005 18:58:00
>Synopsis: remounting ffs read-only (mount -ur) does not sync metadata
>Arrival-Date: Tue Jun 14 18:58:00 +0000 2005
>Originator: Pavel Cahyna
>Release: NetBSD 2.0_BETA i386
System: NetBSD 2.0_BETA (GENERIC_DIAGNOSTIC s patchem D. Reeda - PR#26839) #4: Wed Oct 6 10:13:10 CEST 2004
I was testing some patch to ipfilter and expected a kernel panic. To avoid
damage to my filesystem (especially because I was using async mount at that
time) I remounted it read-only before the test. As expected, syslogd started
complaining that it can't write to /var/log/messages, otherwise everything
seemed to be fine. The test resulted in a panic and after rebooting, fsck
said that the root filesystem is clean. Immediately after the kernel
paniced again with: "panic: blkfree: freeing free frag". I ran fsck -f /, it
found and repaired some errors and everything was fine.
So, mount -ur / left the filesystem in an inconsistent state, which
shouldn't happen. And it marked it as clean, so this inconsistency can be
hard to notice.
This has been discussed in December 2004 - see the thread "FFS update
doesn't sync metadata?" starting with an email from Jaromir Dolecek:
mount a FFS filesystem -o async,rw , then remount it with -o ro,update and run fsck.
Or hard reboot the machine and run fsck after.
Other people report this problem with softdeps instead of async.
See also the message cited above.