1748182 Members
3503 Online
108759 Solutions
New Discussion юеВ

TAR Fail

 
Vogra
Regular Advisor

TAR Fail

I use TAR to make a backup from my system. Last nigth it was fail and show the following message: "Can't open /dev/tty to prompt for more media.". If I try to start again, the tar begin with no problem, but it's second occurency of this problem.
thanx in advance.
We are spirits in the material world
11 REPLIES 11
Ravi_8
Honored Contributor

Re: TAR Fail

Hi, claudio

check the tape size u r using and size of file that u r trying to backup. by looking at the error it looks that file size exceeding the tape size.
never give up
Vincenzo Restuccia
Honored Contributor

Re: TAR Fail

/dev/tty is a device file for a
terminal, probably the console terminal in your case.

Vogra
Regular Advisor

Re: TAR Fail

- Hi Ravi.
the Unit - DLT4000 - uses a 40 Gb tape and it's error occur at begining of copy.

- Hi Vincenzo.
really /dev/tty im my console, but this routine run with Cron and a Console is not in use when the error occur.
We are spirits in the material world
Vincenzo Restuccia
Honored Contributor

Re: TAR Fail

The way I see this is the tape is getting full, and can not find the
console to prompt for another tape.
Ravi_8
Honored Contributor

Re: TAR Fail

Hi,
since the error occur at the begining it is sure that the file to be backed up is larger than the tape size. because the tar checks the size of the file with that of tape, if it is less or equal then tar proceeds else tar fails.
never give up
Bill McNAMARA_1
Honored Contributor

Re: TAR Fail

ioscan -fnkCtape

locate the device file for your DDS drive

then
tar -cvf /dev/rmt/2m
or whatever the device file returned from ioscan is.

A tty device file is for a text terminal or
serial line port multiplexer not for magnetic
tape drives.

Later,
Bill
It works for me (tm)
Vogra
Regular Advisor

Re: TAR Fail

Ravi,
although your mind is correct, the file that TAR is check at begining is too small - and I don't have any file greater than my space in tape. But... I say but, although I'm using
tar -cvf /dev/rmt/0m , I was deep in thought: it's possible the tape is not in the begining when the tar start? Than the tape is going to the end and than I wouldn't have space to save my files? It's possible ?
We are spirits in the material world
Darrell Allen
Honored Contributor

Re: TAR Fail

Hi,

Since you ran the tar from cron there was no controlling terminal for tar to post a mount request when it wanted another tape - hence the can't open /dev/tty message and tar gives up.

Now, why did tar want another tape? Perhaps the one you used was bad or write protected. Have you tried another tape? Was the same tape being used both times tar failed?

Hope this helps,

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Ravi_8
Honored Contributor

Re: TAR Fail

Hi,

check with Darrel points, doubt on the tape.
whenever u tar -cvf it is archieved on the begining of the tape not at the end, to append to the tape we'll use tar -rvf
never give up