Bug 176641 - tar 1.14 doesn't extract sparse files correctly, breaking amanda
tar 1.14 doesn't extract sparse files correctly, breaking amanda
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tar (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-12-28 05:32 EST by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-17 11:16:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2005-12-28 05:32:19 EST
+++ 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

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

How reproducible:

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
Comment 1 Peter Vrabec 2006-01-02 05:01:44 EST
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 11:16:11 EST
On a RHEL3:
$ rpm -q tar

# 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
$ 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
Total bytes written: 20480 (20kB, 20kB/s)

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