LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tar errors: "trailing garbage igored, child returned status 2 etc.) (https://www.linuxquestions.org/questions/linux-newbie-8/tar-errors-trailing-garbage-igored-child-returned-status-2-etc-664185/)

davidstvz 08-20-2008 06:47 PM

tar errors: "trailing garbage igored, child returned status 2 etc.)
 
I checked two different tapes, and tar doesn't do this on the HDD. Does this suggest that the drive is broken? The files actually seem to get stored on the tape just fine despite the error. I haven't been able to find good info via Google. Any ideas?

Code:

srv1# tar xvzf /dev/nsa0
root/z/d1/

gzip: stdin: decompression OK, trailing garbage ignored
root/z/d1/f1
root/z/d1/f2
tar: Child returned status 2
tar: Error exit delayed from previous errors
srv1#

I *really* want to get this sorted out so I can use this tape to back up this machine before the weekend!

I'm trying the tape now with a non-zipped tar, but I'd really like to compress.

davidstvz 08-20-2008 06:57 PM

Fantastic... I tried it with no compression and this is what I get:

Notice that after each archive, I have to run tar twice to extract the files. It's almost like the tape is writing some garbage after each archive or something. Again the files made it off the tape, but I'd like to know the what/why before I rely on this thing.

Code:

srv1# mt -f /dev/nsa0 rewind
srv1# tar xvf /dev/nsa0
root/z/d1/
root/z/d1/f1
root/z/d1/f2
srv1# tar xvf /dev/nsa0
srv1# tar xvf /dev/nsa0
root/z/d2/
root/z/d2/f3
root/z/d2/f4
srv1# tar xvf /dev/nsa0
srv1# tar xvf /dev/nsa0
root/z/d3/
root/z/d3/f5
root/z/d3/f6
srv1#


davidstvz 08-21-2008 09:37 AM

*bump*

Sorry, but I posted this late last night. Thought it should have one more chance for an answer.

cyclepathology 08-21-2008 09:56 AM

Quote:

Originally Posted by davidstvz (Post 3254284)
Fantastic... I tried it with no compression and this is what I get:

Notice that after each archive, I have to run tar twice to extract the files.

Have the tapes been rewound before you do the first tar?

mt -f /dev/tapedev rewind

Then run tar. See if that helps.

davidstvz 08-21-2008 03:29 PM

yep, I'm issuing rewind commands at

mt -f /dev/nsa0 rewind

before any writing to the tape in both cases.

trist007 08-21-2008 03:33 PM

I was considering purchasing some tape to backup my puters. I know using a tape medium is old school, but I'd like to experience it. Is it really true that tape lasts 30 yrs and that it is very vulnerable to magnetism and light? How much would tape costs for say 40 gigs? Where would you buy from, and what's a good brand? Are there any benefits to using tape as opposed to dvds, flash drives, hard disks.

How do you mount tape? What filesystem is it?

davidstvz 08-21-2008 06:45 PM

One nice thing about tape... you can make a tape and then take it with you if you can't afford an actual computer for off-site storage. Off site storage of backup is good in case your building catches on fire or something (it has happened to people I know).

By the way, I still have no idea what's wrong with this tape drive. If anyone else has any ideas, please let me know.

davidstvz 08-21-2008 06:47 PM

Quote:

Originally Posted by trist007 (Post 3255280)
I was considering purchasing some tape to backup my puters. I know using a tape medium is old school, but I'd like to experience it. Is it really true that tape lasts 30 yrs and that it is very vulnerable to magnetism and light? How much would tape costs for say 40 gigs? Where would you buy from, and what's a good brand? Are there any benefits to using tape as opposed to dvds, flash drives, hard disks.

How do you mount tape? What filesystem is it?

It doesn't really have a file system. It is one file, then another file, then another file. Most people write giant tars to tape to minimize the number of different files on the tape. I don't know a hell of a lot about tapes myself.

Ian D 08-22-2008 02:22 PM

Quote:

Is it really true that tape lasts 30 yrs?
I don't know how long a tape would last - but tapes do appreciate being played with from time to time.
You know how an old roll of 'Scotch tape' that has been lying around for some time has funny bits where the tape has lifted off the core. That is because the tape has stretched somehow and is now longer than it was when it was wound on. The same thing happens with computer tape. If you run the tape from one end to the other and then rewind it, it goes down nice and smooth again.
Another problem that can happen with tape is that all the 'bits' stored on one layer (which are just like little magnets) start to act on the layers to either side. By rewinding, they all end up in slightly different positions to last time and so that problem is reduced.
Of course, what you would really want to do is to read the tape from time to time and re-write it (to freshen it up), otherwise, when you try to read it after 30 years you might find that what you have have is a 30 year old strip of mylar and nothing else.

davidstvz 08-23-2008 10:11 AM

So, no ideas about the strange errors I'm getting?

I've tried two different tapes and I've tried compression and no compression.

I guess the only thing left is that either the BSD driver is bad or the hardware is bad.

What gets me is that the files still seem to come off of the tape just fine despite either "trailing garbage" in the case of the zipped tars, or having to run tar twice (except the first file) in the case of non-zipped tars. I guess I should consider just making the backups as is and maybe getting a new tape drive in the future.


All times are GMT -5. The time now is 05:56 AM.