Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2004 03:50:04 +0100
From:      Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
To:        freebsd-current@freebsd.org
Subject:   How to fsck -CURRENT on next reboot [ext2fs]
Message-ID:  <m37jzmdnhf.fsf@merlin.emma.line.org>

next in thread | raw e-mail | index | archive | help
To have your FreeBSD -CURRENT fsck all ufs file systems at next reboot, do:

1. mount_ext2fs an ext2 or ext3 file system for read/write
2. change a file (or touch or rm one)
3. umount that ext2fs again

4. See how it complains about giving up on fsync first for the ext2fs, then
   for devfs.

5. Now reboot.

6. syncher gives up on 3 buffers (I have / /var and /usr - coincidence?)

7. At boot, fsck complains about non-cleanly umounted file systems

For added fun, try instead of 5., try:

5B. umount -f on the ext2fs that you modified instead of reboot
6B. See the kernel panic
7B. savecore logs "reboot after panic: vinvalbuf: dirty bufs"

e2fsprogs (with mke2fs, the ext2fs newfs tool) are available as port
from http://mandree.home.pages.de/freebsd/e2fsprogs/ while Tytso
(e2fsprogs maintainer) reviews my changes - feedback on my port is
appreciated. The e2fsprogs stuff from official ports doesn't work
because it assumes that block devices are buffered.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95



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