Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 1995 08:33:42 -0400
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        freebsd-hackers@freefall.cdrom.com
Subject:   Problem with multi-volume GNU tar files.
Message-ID:  <199506291233.IAA03589@ponds.UUCP>

next in thread | raw e-mail | index | archive | help

Well - here's another one.

I've discovered (while backing up/restoring for a 2.0 -> 2.0.5 using tar)
that there is a subtle bug in GNU tar when multivolume requests are made
and a sufficiently large file spans a volume.

I believe the file has to be large enough so that the remainder (on the
next volume) is larger than the block size (which defaults to 10240 bytes.)

There is a problem with the count of how much was written to the first
volume, and how much is left to write on the second.  It turns out the
first volume contains more bytes than the 'tar' program "believes", so
the headers for the next volume don't contain the correct # of bytes.

The symptom of this phenomena is a message (when restoring) of:

  This volume is out of sequence

when, if fact, it is in sequence.

I've determined that no bytes are lost; just some confusion about
what is where.  Judicious use of  'pax' to retrieve the pieces from
the tar archives, along with 'dd' to get the right bytes appears to be
able to reconstruct the files.

I started to look into this; but the volumes I have are 150-meg QIC
tapes that take forever to get through... so, I hope to reproduce this
with two small floppy images for debugging.

Until someone (hopefully me) gets to this, I'd suggest using cpio instead
of 'tar' for saving things...

	- Dave Rivers -




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506291233.IAA03589>