PAR: Difference between revisions
(Inital draft, more detail to come) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
PAR (''parity'') files are created from a source file or files (''recovery set''), and can be used to restore the recovery set if any file becomes corrupted. | PAR (''parity'') files are created from a source file or files (''recovery set''), and can be used to restore the recovery set if any file becomes corrupted. | ||
Many Hydrogen Audio members back-up their [[Compact Disc Digital Audio|AudioCD]] collection, and a good proportion of these archive their files using [[DVD]]. Optical media is prone to aging, and aging will lead to sector errors and file corruption. The use of PAR2 data can help you to restore a partially corrupted archive, allowing you the luxury of reburning the reconstructed files to a new disc. If you create parity data, and check your DVD archive regularly, there is no reason why you cannot continue this process ad infinitum, or at least until [[DVD]]s become obselete. | |||
=PAR= | = PAR = | ||
PAR files were widespreadly used for Usenet newsgroup multi-part archive files. When posting a file a user could also post PAR files which would allow downloaders to recover any part of the archive by downloading an equal number of PAR files. I.e.: if two parts of the archive were missing or corrupt the downloader would just need to download ''any two'' PAR files and they could successfully recreate the archive. | |||
PAR files were widespreadly used for Usenet newsgroup multi-part archive files. | |||
PAR files are named as follows: | PAR files are named as follows: | ||
* filename.PAR | |||
*.PAR | * filename.P01 | ||
*.P01 | * filename.P02 | ||
*.P02 | * filename.P03 | ||
*.P03 | * etc. | ||
*etc. | |||
The .PAR file is simply a small (~1KiB) index file for the set, and does not contain any parity data. | The .PAR file is simply a small (~1KiB) index file for the set, and does not contain any parity data. | ||
= PAR2 = | |||
=PAR2= | PAR2 succeeded PAR; its main benefit being that there is no relationship between the size of the source files and the size of the PAR2 files, ''and'' that undamaged blocks in a corrupt PAR2 file can still be used to recover the recovery set. The [http://www.quickpar.org.uk/AboutPAR2.htm QuickPar] website has a good description of the main differences between the two formats. | ||
PAR2 succeeded PAR; its main benefit being that there is no relationship between the size of the source files and the size of the PAR2 files, ''and'' that undamaged blocks in a corrupt PAR2 file can still be used to recover the recovery set. The [http://www.quickpar.org.uk/AboutPAR2.htm QuickPar] website has a good | |||
PAR2 files are named as follows: | PAR2 files are named as follows: | ||
* filename.PAR2 | |||
* '''filename.vol<span style="color:red">nnn</span>+<span style="color:purple">mm</span>.PAR2''' | |||
** '''<span style="color:red">nnn</span>''' is the starting block number for this file, and the total number of blocks of all preceding files<br /> | |||
** '''<span style="color:purple">mm</span>''' is the number of recovery blocks in this file, and therefore the number of blocks it can repair | |||
Therefore, if your recovery set becomes corrupt and your PAR2 client tells you that you need nine blocks to repair the set, you will need to utilise a number of PAR2 files whose <span style="color:purple">mm</span> values add up to nine, or more. This may be "filename.vol000+01.PAR2" and "filename.vol007+08.PAR2", or solely "filename.vol015+14.PAR2". | |||
Although you may create PAR2 files with a total of 200 recovery blocks, on repairing you only need to utilise those PAR2 files that contain enough blocks to repair the damage to your recovery set. | |||
= How Does It Work? = | |||
The redundant data in the PAR files is computed using the Reed-Solomon algorithm that allows for recovery of any 'X' real data-blocks for 'X' parity data-blocks present. (data-blocks referring to files ''or'' much smaller virtual slices of files). | The redundant data in the PAR files is computed using the Reed-Solomon algorithm that allows for recovery of any 'X' real data-blocks for 'X' parity data-blocks present. (data-blocks referring to files ''or'' much smaller virtual slices of files). | ||
For more information read [http://parchive.sourceforge.net/docs/specifications/parity-volume-spec/article-spec.html the full PAR 2.0 specification]. | For more information read [http://parchive.sourceforge.net/docs/specifications/parity-volume-spec/article-spec.html the full PAR 2.0 specification]. | ||
= Links = | |||
* [http://parchive.sourceforge.net/ Parchive: Parity Archive Tool]: Home of PAR | |||
* [http://www.quickpar.org.uk/ QuickPar]: A superb PAR/PAR2 GUI | |||
* [http://www.dvdisaster.com/ dvdisaster]: Although not exactly PAR, dvdisaster uses the Reed-Solomon algorithm to create a correction file for a DVD image | |||
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=31146 HA Thread: "Parchive, subdirectory"]: A useful thread discussing PAR2 tactics | |||
[[Category:Software]] | |||
Latest revision as of 14:14, 14 June 2007
PAR (parity) files are created from a source file or files (recovery set), and can be used to restore the recovery set if any file becomes corrupted.
Many Hydrogen Audio members back-up their AudioCD collection, and a good proportion of these archive their files using DVD. Optical media is prone to aging, and aging will lead to sector errors and file corruption. The use of PAR2 data can help you to restore a partially corrupted archive, allowing you the luxury of reburning the reconstructed files to a new disc. If you create parity data, and check your DVD archive regularly, there is no reason why you cannot continue this process ad infinitum, or at least until DVDs become obselete.
PAR
PAR files were widespreadly used for Usenet newsgroup multi-part archive files. When posting a file a user could also post PAR files which would allow downloaders to recover any part of the archive by downloading an equal number of PAR files. I.e.: if two parts of the archive were missing or corrupt the downloader would just need to download any two PAR files and they could successfully recreate the archive.
PAR files are named as follows:
- filename.PAR
- filename.P01
- filename.P02
- filename.P03
- etc.
The .PAR file is simply a small (~1KiB) index file for the set, and does not contain any parity data.
PAR2
PAR2 succeeded PAR; its main benefit being that there is no relationship between the size of the source files and the size of the PAR2 files, and that undamaged blocks in a corrupt PAR2 file can still be used to recover the recovery set. The QuickPar website has a good description of the main differences between the two formats.
PAR2 files are named as follows:
- filename.PAR2
- filename.volnnn+mm.PAR2
- nnn is the starting block number for this file, and the total number of blocks of all preceding files
- mm is the number of recovery blocks in this file, and therefore the number of blocks it can repair
- nnn is the starting block number for this file, and the total number of blocks of all preceding files
Therefore, if your recovery set becomes corrupt and your PAR2 client tells you that you need nine blocks to repair the set, you will need to utilise a number of PAR2 files whose mm values add up to nine, or more. This may be "filename.vol000+01.PAR2" and "filename.vol007+08.PAR2", or solely "filename.vol015+14.PAR2".
Although you may create PAR2 files with a total of 200 recovery blocks, on repairing you only need to utilise those PAR2 files that contain enough blocks to repair the damage to your recovery set.
How Does It Work?
The redundant data in the PAR files is computed using the Reed-Solomon algorithm that allows for recovery of any 'X' real data-blocks for 'X' parity data-blocks present. (data-blocks referring to files or much smaller virtual slices of files).
For more information read the full PAR 2.0 specification.
Links
- Parchive: Parity Archive Tool: Home of PAR
- QuickPar: A superb PAR/PAR2 GUI
- dvdisaster: Although not exactly PAR, dvdisaster uses the Reed-Solomon algorithm to create a correction file for a DVD image
- HA Thread: "Parchive, subdirectory": A useful thread discussing PAR2 tactics