How to compare filesystem contents

D Wyatt dwyatt at sunflower.com
Fri May 7 09:38:19 UTC 2010


On 5/7/2010 4:05 AM, Andrew Junev wrote:
> Hello All,
> 
>  I was moving my filesystem to a new disk with 'cp -ax' command (as
>  root). It completed with no error messages, but I can see some
>  difference between the old and the new filesystems when using df:
> 
> # df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/mapper/vg_mythbackend-wd20eads
>                      1922859824 1791862788  33321364  99% /newdisk
> /dev/mapper/VolTerabytes00-Data00
>                      1922868016 1793705984  51021168  98% /olddisk
> 
> 
> My new filesystem uses ext4, while old one was using ext3 - can that
> be somehow related?. I fact, I don't see how it can affect the used
> space reported, since block size is 4K for both...
>                      
> I'm pretty sure I stopped most of the processes, so there was none that
> could write to original filesystem while files were copied. Well,
> maybe I missed something...
> 
> Is there an easy way to check which files are there on the old
> filesystem, that do not exist on the new one?
> 
> Thanks!
>                      

You could try   diff -r /newdisk /olddisk

or you could install the Windows program 'Beyond Compare' in Wine :)

I don't really know, but it's not beyond the realm of possibility
for ext4 overhead to be the cause of the difference.  And, again,
lacking much understanding of ext4, it's possible that differences
in disk block allocation might explain the difference.

Compare the two directories.

Hopefully, someone who actually knows more filesystem details will
respond and provide more authoritative information.


More information about the users mailing list