Re: Tar error code



On 21 Apr 2007, Martin Gregorie said:
I've noticed over the last few days that GNU tar 1.15.1 is returning termination code 141 after my nightly backup run.

Code 141 isn't listed in either the man page or the info documentation
set.

This is WIFSIGNALED(); to determine the signal, logical-and with 0x7f.

This process has caught a signal 13, SIGPIPE. I'd guess your tar is
piping something into a pipe that is being severed?

and there seem to be no Linux definitions for error codes above 131 and I can't find anything in the tar documentation about the
error code.

Exit codes above 128 being signals are a Unix de-facto standard
(although POSIX doesn't guarantee it, merely that the WIFSIGNALED() and
WTERMSIG() macros return appropriately).

All backups since the 17th have been omitting everything in the last
several files (like everything I back up from /var) and all have the
same size - 4294967295 bytes (2^32-1), so it looks like I've hit some
fundamental tar limit.

Failure in write() should cause tar to print info saying how far it
wrote and then abort().

I'm running standard 32 bit FC6 and backing up to a VFAT USB drive

Ah. The maximum length of a file on a FAT-class filesystem is 2^32-1
bytes (the actual code implementing this in fs/fat/ is rather hard
to find but the restriction is real and unfixable).

I'm surprised to see tar getting hit with an EPIPE here, though. Are
you writing a archive to stdout and then redirecting it to the
filesystem, or something like that? I'd expect to see EINVAL or EFBIG
or ENOSPC or even ERANGE, but not EPIPE, at least if tar were writing
directly to the FAT fs.

Have I hit a backup FS limitation or some internal tar limitation?

The former.

What is the best workaround for this problem?

Don't use VFAT, or split your tarballs before 4Gb.

--
`In the future, company names will be a 32-character hex string.'
--- Bruce Schneier on the shortage of company names
.



Relevant Pages

  • Re: [opensuse] Split command to burn DVD+R (file size)
    ... multi-volume tar to work in the same way as it would with a tape device ... DVD media as read write filestore but I have never suceeded with my ... Packet writing would be really nice, but again not all hardware has ... I do get an I/O error on retrieving data that looks like it is probably ...
    (SuSE)
  • Re: Request for Comments: libarchive, bsdtar
    ... In the case of GNU tar, it depends on where it is writing. ... hope that it pads when writing to a tape device, ... Removing leading `/' from member names ...
    (freebsd-arch)
  • Re: Tar error code
    ... that's what the documentation says and the absence of any diagnostic info is why I suspected a tar bug. ... or ENOSPC or even ERANGE, but not EPIPE, at least if tar were writing ... no pipes involved unless the USB connection magic approximates some sort of pipe. ... martin@ | Martin Gregorie ...
    (uk.comp.os.linux)
  • Re: this is not a specific linux question but more of just UNIX - tar, dump, restore command questio
    ... The 2GiB issue is not a tar issue. ... Dittos for cpio. ... I think, GNU tar has some issues with long filenames, when reading non-GNU ... I am covered with pure vegetable oil and I am writing a best seller! ...
    (comp.os.linux.misc)