md5 of a filesystem / verifying filesystem integrity after

Jerry McAllister jerrymc at clunix.cl.msu.edu
Wed Jun 23 06:42:24 PDT 2004


> 
> Hi all,
> 
> Does someone know how to reliably run a checksum of sorts on a filesystem,
> to be able 
> 
> to verify filesystem integrity after a restore from dump level 0 has
> occurred?

Unless you made a checksum of everything before doing the dump
and made absolutely no changes, there is no way that I know of.

Even some little things such as block arrangements being a little different
after a restore - irrelevant to the integrity of the files - would
make a checksum come out differently if the whole filesystem were
checksummed.

You can do an fsck(8) and see if there are any problems in file
pointers.    But, that is hardly worth bothering with since it
is done at boot time anyway and it doesn't check the content of
the files, only the pointers/chains.   

On some versions of dump either older or from other sources (vendors)
dump had a verify flag that would read back everything and check it 
with what is on disk.   I don't see it in FreeBSD's dump.  Anyway, it
was almost useless since the system would have to be down for the whole
dump and the whole verify pass.   Most people do dumps with the system
up and running and in this case the files can change during the dump
and verify times, thus making verify always fail.  It is a rare system
that can afford to be down long enough to do even a single user mode
dump, let alone adding on the verify.    So, it doesn't surprise me to
see that option gone.

////jerry

> 
> Thanks,
> 
> Ruben 
> 


More information about the freebsd-questions mailing list