>> I have just noticed a problem with tapes written from
>> solaris, linux can't
>> read them unless I write them using a block size of
>> 1. (-b1)
>> The problem with this, is that any backup to tape
>> takes forever now, and
>> is almost useless, yet solaris reads the linux
>> written tapes no problem.
>> This is using gnu tar on both systems too.
>
> Welcome to GNU. The sooner you dump GNU tools, the better off you'll be.
Is it okay if I rant a little here? Just a little? Please?
Ever since I started reading "Solaris Internals" by McDougall and Mauro as
well as "The Magic Garden Explained" by Goodheart & Cox I have come to the
sharp realization that I knew far less than I thought I did. Its a harsh
wake up call let me tell you. Throw in Rich Teers "Solaris Systems
Programming" and you have the makings of a year of study to be _conversant_
with the technology.
This matter of tar files and archival and then hopefully extraction is near
and dear to my heart. It is something that I *feel* that I know something
about. Primarily because I don't have fancy software like Veritas Netbackup
in place to backup my ZFS filesystems or anything more than ufsdump for my
UFS based data. That and the fact that I have been in a telco companies
server room at 2 AM facing thirteen thousand users worth of data files, a
totally panic stricken admin staff, an IT director chewing his own fingers
off and I needed to get all of it backed up and restored before 9AM arrived.
Thanks to Jörg Schilling's star I was able to saturate four fibre channels
and move umpteen gigabytes with bizillions of files faster ( and cleaner )
than anything anyone had ever seen before. Then I installed a cluster of
Sun Netra gear ( with the Java Availability Suite ) and they have been
running smooth ever since. From time to time one hopes that there are
certain basic truths that we can hold to be true; humans breath air, cats
shed on the furniture and tar files are based on tightly written standards.
If only that were true.
If one were to open up the source to tar that is in OpenSolaris you will see
a few copyrights at the top thus :
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* Copyright (c) 1987, 1988 Microsoft Corporation */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
So it seems reasonable that this tar goes back to the beginnings of all tar.
This is the mother of tar and the father of tar and the very primordial tar
that will deal with anything wrapped in a tarfile. There are things written
in that source that seems to be wide sweeping truisms :
#define TBLOCK 512 /* tape block size--should be universal */
The code is beautifully well written and commented everywhere. It is even
commented with thoughts about future looking issues not yet covered thus :
* When one is dealing with extremely large archives, one may want
* to allow for a large number of extents. This code should be
* revisited to determine if extents should be changed to something
* larger than an int.
There is code in there that borders on what I call "cute" :
/* get next volume and verify it's the right one */
copy(&savedblock, &dblock);
tryagain:
newvol();
xhdr_flgs = 0;
getdir();
if (Xhdrflag > 0)
(void) get_xdata(); /* Get x-header & regular hdr */
if (endtape()) { /* seemingly empty volume */
(void) fprintf(stderr, gettext(
"tar: first record is null\n"));
asknicely:
(void) fprintf(stderr, gettext(
"tar: need volume with extent #%d of %s\n"),
i, name);
goto tryagain;
}
if (notsame()) {
(void) fprintf(stderr, gettext(
"tar: first file on that volume is not "
"the same file\n"));
goto asknicely;
}
What you are looking at is real tar. This is the real thing. The code is
there wide open for you to see and to use. It has been FOR A WHILE NOW!
This project. The OpenSolaris project. Has been open now for 2 years ( for
us pilot people ) and if someone out there is NOT using the real non-GNU
tools when they should be .... its their own damn fault.
but hold on .. I'm not done.
Even if you were trying to move tarfiles from Linux to Solaris to OS/2 and
Windows or even Plan9 then you can use the ultimate tar tool called star.
The most recent release of star ( Standards compliant tar ) is 1.5a76 and I
am happy to say that I had some small part in that task. Essentially I hit
an issue with star and ZFS in snv_b46 and sparse files. It was a real
specific set of circumstances and I needed to toss around millions of files
in 200GB of ZFS based compressed data to hit it twice. I worked with Jörg
Schilling on this and he was able to nail down the circumstance and release
an update that I tested.
Essentially you can use the following tools for tar archives in the
following order of descending trust and speed :
(1) Jörg Schilling's star which you can pkg-get from Blastwave or
build it yourself. The source is at :
ftp://ftp.berlios.de/pub/smake/alpha/
See what Jörg has to say here :
http://www.blastwave.org/dclarke/stuff/STARvsGNUTAR
(2) real tar from the OpenSolaris project
bash-3.00$ wc -l src/cmd/tar/tar.c
7939 src/cmd/tar/tar.c
(3) GNU tar in any Linux or where ever you fell into it
(4) Bob's tar from Bob's boots and software shack
If you must tar ... tar wisely. And remember that friends don't let friends
use GNU-tar.
Dennis
_______________________________________________
opensolaris-discuss mailing list
[email protected]