Corruption of UFS filesystems after using md(4)

From: Bruce Cran <bruce_at_cran.org.uk>
Date: Tue, 2 Nov 2010 19:12:14 +0000
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 created a 20GB md device using "truncate -s 20G mdfile && mdconfig -a -f 
mdfile" and then ran some gpart commands before using "mdconfig -d -u 0" and 
rm'ing the file. Some time later I noticed the following had been logged to 
dmesg:

free inode /usr/3367984 had 128 blocks
free inode /usr/3367984 had 32 blocks

Now, whenever I run vim it creates a sparse 20GB .viminfo file - on another 
server those files were reported as being 8TB.

I've disabled background fsck so the filesystems should have been clean when 
the system booted, and I'm not using SU+J. 

-- 
Bruce Cran
Received on Tue Nov 02 2010 - 18:12:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC