cancel
Showing results for 
Search instead for 
Did you mean: 

Tar not working properly

Broflowsky
Occasional Advisor

Tar not working properly

I wanted to do an Ignite but I got the following error,

* Checking Versions of Ignite-UX filesets
ERROR: Write test failed!
ERROR: Check tape device failed.

So I tried a simple tar to see if the tape drive works, but I found this.

[root]:/root # mt -t /dev/rmt/0m rew
[root]:/root # echo $?
0
[root]:/root # tar cvf /dev/rmt/0m /etc/passwd
a /etc/passwd 6 blocks
Tar: end of tape
Tar: to continue, enter device/file name when ready or null string to quit.

User entered a null name for next device file.
[root]:/root #

You know that /etc/passwd is a tiny file, there is no way it could be filling the entire tape.

Any idea what could be wrong?
18 REPLIES
Steven E. Protter
Exalted Contributor

Re: Tar not working properly

Shalom,

Do an ignite? Make an ignite backup?

Your tar is failing because the tape is full. Im think tar can't span multiple tapes. There may be a command line option in the man page for tar that will let you get around this.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TTr
Honored Contributor

Re: Tar not working properly

The "end of tape" is either a generic error that tar outputs when it can't write to the tape or the tape drive reports the end of tape condition because of a bad tape or bad drive. Have you tried a different tape or drive?

PS. Unless you have a very old IgniteUX version, igniteUX has been using pax instead of tar for a while now.

Try some more test with with different tapes and drives.
James R. Ferguson
Acclaimed Contributor

Re: Tar not working properly

Hi:

I suggest that you clean your tape drive and test with a new tape. Your simple 'tar' of the password file should NOT have performed as it did.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: Tar not working properly

>>Your tar is failing because the tape is full.

Doubtful, given the errors shown.

>>Im think tar can't span multiple tapes.

Baloney! Tar has always had the ability to span multiple tapes.

Given the errors above, the things I would try are:

1) Clean the tape drive. Do this 2 or 3 times.

2) Try a new/different tape. A bad tape can cause issues like this.

3) Check SCSI cables and terminators.

4) If all else fails, you may been to replace the tape drive.
Ganesan R
Honored Contributor

Re: Tar not working properly

Hi,

Most suspect part would be media. Also make sure that the tape is not write protected.
Best wishes,

Ganesh.
Steven E. Protter
Exalted Contributor

Re: Tar not working properly

Dirty tape heads can lead the tar utility to falsely indicate the tape is full.

>>
Tar: end of tape
<<

For tar to span multiple tapes, the process must be interactive, so the operator can tell the job when to resume. Run in the background tar can not span multiple tapes.

tar is not able without some kind of input to know when the next tape is ready.

Here it asks for input:
>>
Tar: to continue, enter device/file name when ready or null string to quit.
<<

It would be helpful to know what type of tape drive we are talking about. There are multi tape libraries that can be beyond the built in abilities of tar.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: Tar not working properly

If you rewind the tape and store 6 blocks and receive a "tape full" message, you have either a bad tape or more likely a bad drive.

Try another tape or better change the drive.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Broflowsky
Occasional Advisor

Re: Tar not working properly

The /etc/password file I'm trying to send to tape is only 6 blocks, I tried a new tape and got the same error message.

The tape I tried is new and empty.
OldSchool
Honored Contributor

Re: Tar not working properly

ok, so a "new" tape failed. Did you do any of the other things mentioned, like:

clean the drive,
check the cabling / terminators

*before* you tried the new tape?

also, most drives now have a "clean me" light now. Is it on now? Was it on before you cleaned it?
Wim Rombauts
Honored Contributor

Re: Tar not working properly

After you insert a tape, what is the output of "mt -t /dev/rmt/0m status" ?
Torsten.
Acclaimed Contributor

Re: Tar not working properly

After doing such a test, inspect the syslog for errors. As said before, your drive is likely bad.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TTr
Honored Contributor

Re: Tar not working properly

Which tape drive and what type of tape(s) are you using?

Also back in March you had a similar if not identical problem? How did you resolve that one or is it the same one?
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1322175
Broflowsky
Occasional Advisor

Re: Tar not working properly

The tape drive has been cleaned.

This is the output of the mt command

[root]:/root # mt -t /dev/rmt/0m status
Drive: HP C5683A
Format: DDS-3 format
Status: [1112500] online compression immediate-report-mode
File: 0
Block: 0

I also tried an fbackup as adviced in the other thread but got I/O error messages.

[root]:/root # mt -t /dev/rmt/0m rew
[root]:/root # fbackup -f /dev/rmt/0m -i /etc
fbackup(1004): session begins on Wed Jul 1 10:07:16 2009
fbackup(3205): WARNING: unable to read a volume header
fbackup(3024): writing volume 1 to the output file /dev/rmt/0m
fbackup(9999): I/O error
fbackup(3124): write error on a record in the ANSII label
fbackup(3025): write error at the beginning of the volume
fbackup(3316): enter '^[yY]' when volume 1 is ready on /dev/rmt/0m,
or '^[nN]' to discontinue:
y
fbackup(3205): WARNING: unable to read a volume header
fbackup(3024): writing volume 1 to the output file /dev/rmt/0m
fbackup(9999): I/O error
fbackup(3124): write error on a record in the ANSII label
fbackup(3025): write error at the beginning of the volume
fbackup(3316): enter '^[yY]' when volume 1 is ready on /dev/rmt/0m,
or '^[nN]' to discontinue:
n
fbackup(3019): would you like to enter a new output file?
n
fbackup(3022): would you like to continue this session?
n
fbackup(3004): writer aborting
fbackup(1002): Backup did not complete : Reader or Writer process exit
[root]:/root #
TTr
Honored Contributor

Re: Tar not working properly

You have a DAT4 tape drive and either you are using DDS3 tapes or the drive is not reporting the tape properly. (That's why I asked what kind of tapes you use). Ensure that all the tape related patches are installed on your server. Also install the "library and tape tools" software on the server and ensure that the tape drive has the latest firmware in it.
Broflowsky
Occasional Advisor

Re: Tar not working properly

I use DDS4 tapes, it is the same problem with the same server I had back in March, that time HP replaced the tape drive, and everithing worked, I only use this tape drive to perform monthly ignite backups, so this tape drive has olny been used 4 times. and it is not working again. What I'm trying to avoid is having to have this tape drive replaced every 4 months.
TTr
Honored Contributor

Re: Tar not working properly

It may very well be a tape drive issue specially since it looks like the drive is reporting all media as being at EOT. Other than replacing it again I don't see what else you can do. When it was replaced the last time, you probably got a refurbished unit and not a brand new one.
OldSchool
Honored Contributor

Re: Tar not working properly

"root]:/root # mt -t /dev/rmt/0m status
Drive: HP C5683A
Format: DDS-3 format
Status: [1112500] online compression immediate-report-mode
File: 0
Block: 0"



"I use DDS4 tapes, it is the same problem with the same server I had back in...."


what you say and what the drive says *differ*. If this worked after the drive replacement, I'd suggest that the replacement has failed again.
Patrick Wallek
Honored Contributor

Re: Tar not working properly

>>What I'm trying to avoid is having to have this tape drive replaced every 4 months.

If this tape drive is covered by a maintenance contract, I wouldn't worry. HP will replace it as often as necessary. What you CAN do however is start questioning HP as to why the drive fails so often.