gtar failing, please help!

Kevin A. Pieckiel pieckiel+freebsd-questions at
Wed Feb 2 11:04:31 PST 2005

I have some backup scripts that manipulate a tape library and tape
drive to perform my nightly backups.  Ever since the switch from
gtar to bsdtar in the base system, gtar fails to write any data
to my tape and usually puts my SCSI bus in an unusable state.  I
must then issue a camcontrol reset command to free up the tape
drive for use.

Unfortunately, I can't use dump or bsdtar because my data spans
multiple tapes.  Now I'm stuck without any backup solution because
bsdtar/dump don't have the features I need, and gtar no longer
writes to my tapes.  (I understand that dump will support multi-
tape archives, but the provision is with user intervension.  I'm
not going to wake up at 0-dark-30 on Sunday mornings to manually
tell my tape library to switch tapes!)

What broke gtar?  How do I fix it?  Please help!

Below, you'll find some system info including program versions
and exact commands I'm using to replicate the problem.  In the
second section, you'll see that bsdtar works great.  Too bad it
doesn't allow multi-tape archives!  The third section shows the
failing gtar (it does this on all versions installed) and how it
locks up my tape drive until I reset the SCSI bus.

What other info might you need to help me fix this?


----- 8< -----

# uname -a
FreeBSD 5.3-STABLE FreeBSD 5.3-STABLE #4: Thu Jan 13 19:07:12 EST 2005     toor at  i386

# which gtar

# gtar --version
tar (GNU tar) 1.13.25
Copyright (C) 2001 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.

# /usr/local/bin/gtar --version
tar (GNU tar) 1.15.1

# tar --version
bsdtar 1.01.011, libarchive 1.01.013
Copyright (C) 2003-2004 Tim Kientzle

# camcontrol inquiry 2:1:0
pass2: <EXABYTE Mammoth2 v07w> Removable Sequential Access SCSI-2 device 
pass2: Serial Number 0062016715
pass2: 80.000MB/s transfers (40.000MHz, offset 31, 16bit)

# camcontrol inquiry 2:0:0 
pass1: <EXABYTE Exabyte 430 3.2> Removable Changer SCSI-2 device 
pass1: Serial Number 67500160  
pass1: 3.300MB/s transfers 

----- 8< -----

# tar -cvf /dev/nsa0 -b 128 --preserve --totals *
a root
a root/.snap
a root/.snap/backup.snap
a root/dev
a root/tmp
a root/usr
a root/var
a root/stand
a root/stand/etc
a root/stand/etc/defaults
a root/stand/etc/defaults/rc.conf
a root/stand/etc/netconfig
a root/stand/etc/protocols
a root/stand/etc/services
a root/stand/etc/group
a root/stand/help
a root/stand/help/COPYRIGHT.hlp
a root/stand/help/README.TXT
a root/stand/help/ERRATA.TXT
a root/stand/help/anonftp.hlp
a root/stand/help/EARLY.TXT
a root/stand/help/tcp.hlp
a root/stand/help/RELNOTES.TXT
a root/stand/help/HARDWARE.TXT
a root/stand/help/INSTALL.TXT
a root/stand/help/configure.hlp

----- 8< -----

# gtar -cvf /dev/nsa0 -b 128 --preserve --totals *               
Total bytes written: 0 (0B, 0B/s)
gtar: /dev/nsa0: Wrote only 0 of 65536 bytes
gtar: Error is not recoverable: exiting now

# mt errstat
mt: /dev/nsa0: Invalid argument

More information about the freebsd-questions mailing list