Date: Wed, 3 Nov 2010 07:49:04 +0100 From: Peter Holm <pho@freebsd.org> To: Bruce Cran <bruce@cran.org.uk> Cc: freebsd-current@freebsd.org Subject: Re: Corruption of UFS filesystems after using md(4) Message-ID: <20101103064904.GA39407@x2.osted.lan> In-Reply-To: <201011021933.51052.bruce@cran.org.uk> References: <201011021912.14281.bruce@cran.org.uk> <201011021933.51052.bruce@cran.org.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 02, 2010 at 07:33:50PM +0000, Bruce Cran wrote: > On Tuesday 02 November 2010 19:12:14 Bruce Cran wrote: > > I've noticed in recent months that I appear to be getting silent corruption > > of my UFS filesystems - and I think it may be linked to using md(4) or > > creating sparse files. > > I've confirmed this is a UFS bug related to sparse files: "truncate -s20G f1 > && rm f1" is enough to trigger the error and start generating .viminfo files > that appear to be 20GB. When running fsck I get an "Invalid block count" error > if I just reboot without removing the .viminfo file; if I do remove it, I get > a "Partially allocated inode" error. > I'm able to verify this by: "m.sh" 49L, 1917C written $ ./m.sh Local config: x4 + mdconfig -a -t swap -s 1g -u 5 + bsdlabel -w md5 auto + newfs -U md5a + mount /dev/md5a /mnt + truncate -s20G /mnt/f1 + rm /mnt/f1 + umount /mnt + fsck -t ufs -y /dev/md5a ** /dev/md5a ** Last Mounted on /mnt ** Phase 1 - Check Blocks and Sizes PARTIALLY ALLOCATED INODE I=4 UNEXPECTED SOFT UPDATE INCONSISTENCY CLEAR? yes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? yes SUMMARY INFORMATION BAD SALVAGE? yes BLK(S) MISSING IN BIT MAPS SALVAGE? yes 2 files, 2 used, 506481 free (25 frags, 63307 blocks, 0.0% fragmentation) ***** FILE SYSTEM IS CLEAN ***** ***** FILE SYSTEM WAS MODIFIED ***** + mdconfig -d -u 5 $ - Peter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101103064904.GA39407>