-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
111 lines (66 loc) · 3.49 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Parity Archive - A way to restore missing files in a set.
Copyright (C) 2001 Willem Monsuwe ([email protected])
The source code can be downloaded from parchive.sourceforge.net
as par-v0.2alpha.tar.gz
This version is released under the GNU Public License.
See the file COPYING (in the source code archive) for details.
File format by Stefan Wehlus -
initial idea by Tobias Rieper, further suggestions by Kilroy Balore
Beta release, version 0.9
DESCRIPTION:
This version uses Reed-Solomon coding to make multiple parity volumes from
the same set of files.
What this means is that you can recover as many files as you have recovery
volumes. Any recovery volumes for that set will do.
TYPICAL EXAMPLE OF USE:
You are uploading a rar-archive, Archive.rar to a newsgroup, split into 40
files. You decide to make a parity archive with five recovery volumes:
>par add -n5 Archive.PAR Archive.r??
You machine rattles for a minute or two, resulting in one (small)
Archive.PAR file, and five files Archive.P01 - P05. You upload these.
People download your files, and the Archive.PAR file to check if they
downloaded correctly. Someone runs par to check if he got all files:
>par check Archive.PAR
It reports that three files are missing, and he would need three parity
volumes to recover them. He tries to download these, and he gets
Archive.P02, .P04 and .P05. Then he runs par to recover those files:
>par recover Archive.PAR
His machine rattles for a minute or two, and all his files are restored.
HINT FOR WINDOWS USERS:
If you make a file 'par.bat' which contains the following line:
par.exe r -- %1
You can associate this with .par files, so it will automatically
recover files from the .par file you doubleclick on.
NOTES:
- This version of par never overwrites an existing file. It can, however,
move files out of the way (with the -m flag)
- Par will also search for files with different filenames (by the md5
checksum), and can give those files their correct name (with -f)
Searching for missing files could take some time, if there are lots of
files in the directory
- Par will only work with files in the current directory.
- Par can try to recover files using parity volumes from different sources:
>par m
This has a pretty decent chance of working, but it's not guaranteed to work.
It will try to locate every single parity volume in the current directory,
throwing them together to try to recover as many files from them as possible.
If you use this in a large dir, Par might try to open too many files and fail.
REED-SOLOMON CODING:
The file rs.doc contains sort of an explanation on how the encoding works.
Also, all Reed-Solomon related stuff is in one file, rs.c, with a single
interface function. This should make it easy to write different RS-based
recovery archive programs.
You can look at the following link:
``A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems''
<http://www.cs.utk.edu/~plank/plank/papers/CS-96-332.html>
TODO:
- Write a better explanation of how Reed-Solomon coding works (see rs.doc)
- Check if it compiles on something like a PPC (non-aligned access issues)
COMPILING:
You're pretty much on your own here.
There's a small Makefile, and the code uses as few special things as possible.
GCC should be able to compile it on most Unices.
It also compiles for MS-DOS, using DJGPP (http://www.delorie.com/djgpp/) and
it's been tested on a Win98SE box.
As this is a testing version, and the spec is going to change soon, not
much effort has been made for portability.