main - Projects
prev - Projects -> Argus Array -> 2 Software -> 2 Maintenance Scripts
next - Projects -> Argus Array -> 2 Software -> 4 Movie Extraction

Projects -> Argus Array -> 2 Software -> 3 Paranoid File Copy

In this project I have many questionable drives, running with questionable controllers on questionable motherboards with questionable power. In this case, I decided it was worth my time to make a copy program that questions everything. I came up with my Java Paranoid File Copy program. It does pretty much the same thing as the 'cp' command, but while taking an MD5 sum as it does the read of the source file and doing an MD5 sum of the final file after the write. Also, it checkes these sums against stored sums.
java docs
jar file
It takes four parameters:
srcdir dstdir file md5path
So in my environment a command might look like:
java -jar FileCopy.jar /argus/mnt/wdc320-0 /argus/mnt/ssam500-0 DS9_S1D1.ISO /argus/md5
In this example, if /argus/md5/DS9_S1D1.ISO.md5 exists, it is used and the copy is aborted if the read does not match it. If this file does not exist, it is created. The write is saved to a temp file in the target directory until the final check of the written file is passed. After that it is atomicly moved to the name given. Note: this does two passes over the data so it is quite slow. However, you can be sure that at least at the moment the file was copied correctly.


main - Projects
prev - Projects -> Argus Array -> 2 Software -> 2 Maintenance Scripts
next - Projects -> Argus Array -> 2 Software -> 4 Movie Extraction






projects blog
©1999-2007 Joseph Gleason. Duplication of above materials prohibited without express written permision. All Rights Reserved.