help with tape drive on aix 5.1

I have a dlt tape drive on a AIX 5.1 machine, I have no idea how to backup to this thing, would I just mount it can copy over to it, not sure the commands or where to begin? Can anyone help, or point me to documentation....

actuall this is how prtconf lists it

+ rmt0 40-60-00-0,0 SCSI 8mm Tape Drive (20000 MB)

ok, after some research i got this far

I have come to a wall.
Im trying to copy files to a 8mm tape drive on hostname, using the cpio command. Something like this

ls_*.c_|_cpio_-ov_>/dev/rmt0

I keep getting this

Cannot write to disk

Can anyone help?

Does /dev/rmt0 exist? I don't know AIX, but it may be /dev/rmt/0. The file must exist and be a special file that points to the tape drive.

First - let me mention I don't have an AIX system to test with

But, you should be able to use the following commands to see if the system can use the tape drive. Check your documentation (man pages) for proper use of commands given.

List tape drives:
$ ls -l /dev/rmt

Get status of tape drive (put a tape in the tape drive)

$ mt -f /dev/rmt/0 status

To see if you can backup files to it - cvf means create, verbose, file to backup to (normally not needed when using /dev/rmt/0 but I usually put it in anyway)
$ cd /var/adm
$ tar cvf /dev/rmt/0 .

yes, /dev/rmt0 is there, and if i run

# lsdev -Cc tape
rmt0 Available 40-60-00-0,0 SCSI 8mm Tape Drive

this leads me to believe it is available

what command is this?

mt -f /dev/rmt/0 status

specifically the mt command?

ignore the part about mt in my previous post, i got this

# mt -f /dev/rmt0 status
rmt0 Available 40-60-00-0,0 SCSI 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 no Use EXTENDED file marks True
ret no RETENSION on tape change or reset True
density_set_1 39 DENSITY setting #1 True
density_set_2 39 DENSITY setting #2 True
compress yes Use data COMPRESSION True
size_in_mb 20000 Size in Megabytes False
ret_error no RETURN error on tape change or reset True

I, like Perderabo, have not seen anything like /dev/rmt0 before - I just figured it was a typo.

Since the mt command worked, try the tar command - just change it to /dev/rmt0 instead of /dev/rmt/0.

Then to see if it truely worked

$ tar tvf /dev/rmt0

That should give you a listing of what is on the tape. Always check the commands given versus what AIX may have especially since we have seen the one difference in how AIX vs others looks at tape drives.

here is the command from aix doc

For example, to list the files that have been saved onto a diskette with the cpio command, type:

cpio -itv </dev/rfd0

Im assuming that i can replace the word diskette with tape and
/dev/rfd0 with /dev/rmt0

when I run this i get

Cannot read from device

maybe i cant replace rfd0 with rmt0.......

But you don't have a tape that was written by an earlier run of cpio. Try to write a tape, not read one.

You will need to put a tape in the drive and make sure that it is writable. For 8mm, there is a little tab that you slide open to make the tape writable.

And tar is much more simple than cpio. Try that tar command RTM gave you. Once you have that working you can move on to cpio if you really must.

When I run tar tvf /dev/rmt0, it just hangs there.....

Maybe the tape isnt rewound, I can actually get to the server, its in a remote location....

Is there a way to rewind the tape from the command line?

it came out of the hang with this

tar tvf /dev/rmt0
tar: 0511-193 An error occurred while reading from the media.
There is an input or output error.

You should have someone at the remote site verify the tape is still in the drive.

Also you can use
$ mt -f /dev/rmt0 rewind
to rewind the tape (check your documentation to see if this is valid with AIX mt command)

ok, so i had the guy in my team who is onsite at the data center pop in a new tape

Per your request I tried popping in other tape.

Here is what I got:

When I tried putting in other tape I got "clean drive" msg.
So I cleaned drive.
Put back in orig tape thinking that's all it was.
Tried to do simple copy and got "Cannot write to Device:"
So went back up and tried other tape .. got "clean drive" msg again
Cleaned drive again.
Put in other tape.
Tried doing simple copy and got same msg .. ie Cannot write .. etc

Ran cmd below and figured drive ok .. but not sure ..

You guys have any ideas/suggestions?
thx

# tctl -f /dev/rmt0 status
rmt0 Available 40-60-00-0,0 SCSI 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 no Use EXTENDED file marks True
ret no RETENSION on tape change or reset True
density_set_1 39 DENSITY setting #1 True
density_set_2 39 DENSITY setting #2 True
compress yes Use data COMPRESSION True
size_in_mb 20000 Size in Megabytes False
ret_error no RETURN error on tape change or reset True
#

Our only other theory is maybe the density of the tape is incorect? any other ideas?

I'm still not clear on what type a drive this is. A few drives can read more formats than they can write. For example a DDS 3 drive can read DDS2 tapes and DDS tapes. But the DDS 3 drive that we have cannot write on DDS 2 tapes. So it might be that you the wrong tapes for the drive to write on.

But the most probable answer is that you have a broken tape drive. The drive request a cleaning when a write operation fails that it expected to work. That often fixes the problem when writes fail. But not always.