[arch-general] Ye Olde Package Manager

Frédéric Perrin frederic.perrin at resel.fr
Sun Jan 16 13:16:49 EST 2011


Le dimanche 16 à 13:52, Ng Oon-Ee a écrit :
> On Sun, 2011-01-16 at 12:22 +0100, Frédéric Perrin wrote:
>> Why would a database be more subject to corruption than a tar file, and
>> harder to recover?
>
> An answer from an average user: I believe in tar files corruption would
> only affect the files stored at that 'place' in the tar files. So for
> example if there's a failing HD and 20 sections are affected, 'only'
> that information is lost.

tar files are stored with a header (a 512-bytes block) that describes
the file name, the size of the file, etc., then (filesize / 512) blocks
of data, then 2 blocks of \0, and repeat for the next file. If one file
header is corrupted and the file size can't be read or is wrong,
everything after can't be read. Now, in our case, two blocks of \0 are
unlikely in a text file, so this can be used to detect this case. Hum,
maybe you're right, but still tar files seem rather bad prepared to deal
with corruption.

-- 
Frédéric Perrin -- http://tar-jx.bz


More information about the arch-general mailing list