Verifying file copies

Status
Not open for further replies.

Intropy

Dabbler
Joined
Sep 17, 2013
Messages
13
I'm just starting out with a new FreeNAS setup. I've gotten set up to the point where I have CIFS sharing working and I can copy files onto the NAS from clients.

Now I want to transfer a large amount of data to the NAS. Is there a good way to verify that all the data was copied correctly? I know ZFS has block level checksumming and that will make sure everything that gets to ZFS is written to disk correctly, but how can I make sure no corruption happens earlier? Does CIFS detect corruption or use any FEC scheme?

The most obvious thing to me seems to be to hash every file on both the source and destination machines, write those to a text file, and then check that the file has the same list of hashes. I have a few issues with that approach:
1. It's a lot of effort.
2. The source is Windows and the destination FreeNAS, so I have to make sure whatever tools actually get the same hashes for the same logical set of files ignoring whatever hidden stuff gets put into the respective filesystems.
3. The FreeNAS volume is much bigger than anything on the source, so I'm moving from multiple source directories into a single destination. So a single recursive statement will hit everything in FreeNAS, but the source will need multiple, which means additional processing to get all those hash comparisons "aligned". Doable, but likely a PITA.
4. I don't actually have a good idea of what file hashing tools are available on either platform.

Any advice?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
CIFS has its own packet checksums. As long as your server has ECC RAM its a pretty safe bet you aren't losing lots of data anywhere. :)

You could do rsyncs from source to destination but that will take some planning and execution as rsync will try to match EVERY file you point it to. So if a file is present where it shouldn't be it will get deleted.

On all seriousness, I copied 20TB of data over CIFS without any concern about losing data during the process. I had the same concerns you are discussing here, but CIFS is a very safe bet. FTP absolutely isn't.
 

Intropy

Dabbler
Joined
Sep 17, 2013
Messages
13
That's good to hear about CIFS. I just won't sweat it then. Thanks for the info.
 
Status
Not open for further replies.
Top