Corruption of UFS filesystems after using md(4)

Bruce Cran bruce at cran.org.uk
Tue Nov 2 19:12:16 UTC 2010


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


More information about the freebsd-current mailing list