Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tape /Tape Driver Error?

Status
Not open for further replies.

KOG

MIS
Jan 31, 2002
303
GB
Hi folks,

I got this error message when trying to read the backup contents from the tape,

restore: 0511-160: cannot read the backup media /dev/rmt0 there is an input or output error.

I have cleaned the tape driver and it was a new tape that I inserted.

Does this error message show errors of tape or tape driver, it does not seem very clear to me.

Anyone shed a light pls.

Thanking you all in advance.

Regards

Katherine
 
0511-160
Cannot read the backup media
Possible Causes
The tape is backed up on a tape device with a block size that differs
from the one on which it is currently set.
The backup medium is damaged.

Procedures for Recovery
Log in as the root user and use the chdev command to change
the block size on the tape device:
chcev -1 rmt# -a block size=0

You can also change the block size by selecting the
SMIT Devices-> Tape Drive->Change/Show Characteristics of a Tape
Drive menu options. Select the appropriate drive and
change the block size.

Check the error log for tape errors:

errpt -a
 
Hi Folks,

I am new to AIX so could you please explain what I should do and what do u mean by 'change block size' how do I know what the block size should be? Where do I get the information from?

What is dd if=/dev/zero of=/dev/rmt9 obs=[block size]

Is that line command to run?

The tape is new and I ran smitty mysksyb and it ran fine and i seemed to have saved the contents onto the tape but when I ran smitty again to check the contents of backups, it failed?

That is rather odd to me.

Cheers

Katherine
 
Log in as the root user and use the chdev command to change
the block size on the tape device from the command line:
chdev -1 rmt# -a block_size=0

You can also change and VIEW the block size by selecting the
SMIT Devices-> Tape Drive->Change/Show Characteristics of a Tape
Drive menu options. Select the appropriate drive and
change the block size.

To check the current blocksize of the tape device, enter:

tctl -f /dev/rmt0 status
 
PS> The blocksize is set to the same blocksize that was used when the tape was made....
If you don't know what it was....you set it to zero for variable block size.....
 
Hi folks,

Will do this tomorrow morning.

Many thanks for all your responses.

Much appreciated.

regards

Katherine
 
Hi folks,

After querying the smit device for block size and the current block size of the tape device it seems both are the same so what would be the cause for it not being able to 'restore' or read its contents?

Tape Drive rmt0
Tape Drive type 8mm5gb
Tape Drive interface scsi
Description 5.0 GB 8mm Tape Drive
Status Available
Location 10-60-00-5,0
Parent adapter scsi0
Connection address 5,0
BLOCK size (0=variable length) [1024] +#
Use DEVICE BUFFERS during writes yes +
RETURN error on tape change or reset no +
Use EXTENDED file marks yes +
DENSITY setting #1 140


# tctl -f /dev/rmt0 status
rmt0 Available 10-60-00-5,0 5.0 GB 8mm Tape Drive
attribute value description user_settable

mode yes Use DEVICE BUFFERS during writes True
block_size 1024 BLOCK size (0=variable length) True
extfm yes Use EXTENDED file marks True
density_set_1 140 DENSITY setting #1 True
density_set_2 20 DENSITY setting #2 True
compress yes Use data COMPRESSION True
ret_error no RETURN error on tape change or reset True

There are no errors from errpt.

So what should I do please? How do I write 'something' onto the tape?

Thanking you all in advance.

Regards

Katherine
 
Hi,
if you have to restore -T the tape, nothing you have to write on it.

To test the rmt0 device, use another tape and, try whit;

find /tmp | backup -ivf /dev/rmt0
restore -Tvf /dev/rmt0

If your devices is OK, reinsert your backup tape and,
following aixqueen instruction, try to change block size:

set to 1024, then restore
try whit 512 then try to restore
same thing whit 0 .

I will know:

1) the media has been written by this device ?
2) you know the block size used during backup ?
3) your rmt0 has been removed then rebuild by a chgmgr ?

bye
 
the commands you tried are telling you the same thing....whether through smit
or the commandline... what the tape drive is set at...and it is set at 1024.
They do not tell you what the tape was set at when the tape was made.

They are NOT telling you what the TAPE was made at....
Did you receive this tape from someone ? Was
it backed up in smit...on this tape drive? Did whoever made the tape
tell you what commands they used to back it up? Is it written on the tape
label ?

My original reply to your error message is still valid...Try changing the blocksize
of the tape drive to zero and see if you can read the tape. You
can do it in smit or command line............... if that doesnt
work the tape itself may be bad or damaged....
 
Hi aixqueen,

Many thanks for your response I am getting so confused here, at first it was a new tape that I used for mksysb backup and it seems to run ok. Then I did smit to check its backup contents. That is how I got the error message. The tape is brand new.

I have taken a tape that I used for savevg backup done three weeks ago and did the following commands;

# chdev -l rmt0 -a block_size=512
# mt -f /dev/rmt0 rewind
# mt -f /dev/rmt0 status
# restore -s4 -Tvf /dev/rmt0.1 | head


Set block size to 512

# mt -f /dev/rmt0 rewind
# mt -f /dev/rmt0 status
rmt0 Available 10-60-00-5,0 5.0 GB 8mm Tape Drive
attribute value description user_settable

mode yes Use DEVICE BUFFERS during writes True
block_size 512 BLOCK size (0=variable length) True
extfm yes Use EXTENDED file marks True
density_set_1 140 DENSITY setting #1 True
density_set_2 20 DENSITY setting #2 True
compress yes Use data COMPRESSION True
ret_error no RETURN error on tape change or reset True


But I got an error message at the end, when I did the

# restore -s4 -Tvf /dev/rmt0.1 | head command

"restore: 0511-157 cannot skip tape records"

Do u think the tape is faulty or is it the tape driver?

These error messages are so unclear.

Now I know it can read the tape and it can alert the block size but why would it not read the contents?

Hope you can make sense out of it?

Thanking you in advance.

Cheers

Katherine
 
Ok so the original is a mksysb tape that you made? So there are four sections on the tape and 512 is what is usually used...
After making a new mksysb on a new tape (and when you created the mksysb you did
not have a log file that you looked at)?
OK so you have your mksysb.........

You tried
smit lsmksysb
or
tctl -f /dev/rmt# rewind
restore -s4 -Tvqf /dev/rmt#.1 > /tmp/mksysb.log

And both failed...?

Then the media is probably bad ...since the block size is 512 and that is what it should be.

--------------------------------------------
And then you used a savevg...not a mksysb....the skip is not the same in a
savevg as in a mksysb so that error is expected..
You should have tried the

restore -Tvqf /dev/rmt#.1 > /tmp/savevg.log
or
smit lsbackvg

-----------------
IF The tape drive has worked before...and there are no errors in the errpt?
And If you can read the savevg tape using the NEW commands directly above,
and IF you just bought new tapes. I would surmise that it is a batch of
bad tapes and backups taken on the new tapes will be of no use to you.

Find an old tape, do a mksysb, and if you can then verify it,.....it has to be the tapes.
You can try reading and verifying on older tapes...

Remember you do not skip with the s4 on savevg tapes like you do in mksysb
hence the error.

mksysb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top