Bug 176641 - tar 1.14 doesn't extract sparse files correctly, breaking amanda
Summary: tar 1.14 doesn't extract sparse files correctly, breaking amanda
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tar
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Ben Levenson
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-28 10:32 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-17 16:16:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bastien Nocera 2005-12-28 10:32:19 UTC
+++ This bug was initially created as a clone of Bug #154882 +++

Description of problem:
Amanda uses the --sparse option to tar when creating backups. Tar 1.14 is known
to have problems with extracting sparse files (see
http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html).

Version-Release number of selected component (if applicable):
tar-1.14-4, amanda-2.4.4p3-1

How reproducible:
Always

Steps to Reproduce:
1. /bin/tar --create --file /dev/null --directory / --one-file-system
--listed-incremental /var/lib/amanda/gnutar-lists/euclid.math.ohiou.edu__0.new
--sparse --ignore-failed-read --totals --exclude-from
/var/log/amanda/sendsize._.20050414123909.exclude .

Where /var/lib/amanda/gnutar-lists/euclid.math.ohiou.edu__0.new and
/var/log/amanda/sendsize._.20050414123909.exclude are both empty files.  

Actual Results:  The tar output claimed I had 1.2TB on a 20GB partition

Expected Results:  It would have told me I was using about 3.5GB of my 20GB
partition.

Comment 1 Peter Vrabec 2006-01-02 10:01:44 UTC
I guess your /var/log/lastlog is a big sparse file. Fixing tar is not efficient
until lastlog size is allright.


Comment 3 Bastien Nocera 2006-01-17 16:16:11 UTC
On a RHEL3:
$ rpm -q tar
tar-1.13.25-13

# Create a sparse file:
$ dd seek=500000 count=5 if=/dev/random of=test
0+5 records in
0+1 records out
$ ls -lh test
-rwxrwxr-x    1 bnocera  bnocera      244M Jan 17 16:13 test
$ du -hs test
28K     test

# Create the tar file
$ tar cvfS test.tar test
test
$ ls -l test.tar
-rw-rw-r--    1 bnocera  bnocera     20480 Jan 17 16:15 test.tar

# Show the totals
$ tar cvS --file /dev/null --totals test
test
Total bytes written: 20480 (20kB, 20kB/s)



Note You need to log in before you can comment on or make changes to this bug.