some of my files have an incorrect block count

Aragon Gouveia aragon at
Fri Aug 28 18:51:28 UTC 2009


I'm copying data across to a larger file system and in so doing, I've 
noticed that some of the files in my old file system have an incorrect 
block count.  After copying all data, df(1) reports that the new file 
system has more data on it than the old one.  I've narrowed most of the 
difference to one file in particular:

%ls -l /data/qemu/winxp.qem /mnt/data/qemu/winxp.qem
-rw-r--r--  1 aragon  staff  10737418240 Mar 29 21:57 /data/qemu/winxp.qem
-rw-r--r--  1 aragon  staff  10737418240 Mar 29 21:57 

%du -k /data/qemu/winxp.qem /mnt/data/qemu/winxp.qem
10490896	/data/qemu/winxp.qem
2001728	/mnt/data/qemu/winxp.qem

%du -Ak /data/qemu/winxp.qem /mnt/data/qemu/winxp.qem
10485760	/data/qemu/winxp.qem
10485760	/mnt/data/qemu/winxp.qem

%stat -f '%N: %z %b' /data/qemu/winxp.qem /mnt/data/qemu/winxp.qem
/data/qemu/winxp.qem: 10737418240 20981792
/mnt/data/qemu/winxp.qem: 10737418240 4003456

In the above the new file system is /data, the old /mnt/data.

Running fsck(8) on the old file system doesn't show any errors and makes 
no difference.

If dd(1) reads both files in, it counts the correct size, and running 
md5(1) on both copies of the files produces the same hash, so at least 
all the data is presumably present.

Surely fsck(8) should detect this?

Is this inconsistency cause for concern?


More information about the freebsd-fs mailing list