Ejecting tape on AIX & Some Tape commands

I am trying to use this command to eject the tape

mt -f /dev/rmt/0 unload

but it gives me error

 mt -f /dev/rmt/0 unload
mt: 0511-575 unload is not a recognized subcommand.
Usage:  mt [-f Device] Subcommand [Count]
        Valid subcommands are:
        weof
        eof
        fsf
        bsf
        fsr
        bsr
        rewind
        offline
        rewoffl
        status

or

tctl -f /dev/rmt0 offline
/dev/rmt0: The device is not ready for operation.

But the tape is inside the drive !

some other tape commands

Getting information about the tape. It is using compression and a variable length block size

tctl -f /dev/rmt0 status

Rewinding tape drive

tctl -f /dev/rmt0 rewind

Rewind and eject the rmt0 tape drive

# tctl -f /dev/rmt0 offline

Check the content of the tape

#tctl -f /dev/rmt0.1 -b 1024 -n read

Reading tape and redirecting output to a file. In this case, the operating system showed that the tape itself is damaged.

tctl -f /dev/rmt0 read > /tmp/testtape

Getting info about the tape

lscfg -vpl rmt0

did you try to press the eject button? :-))

This doesn't need to be the case. If the tape was written with another blocksize (default blocksize depend on hardware, so we do not know what yours is) then trying to read will result in a "tape damaged" - in fact it is, in a way, because it was formatted differently.

I hope this helps.

bakunin

Can it be that the tapes was still working on a previous job. Sometimes it helps to wait some minutes before you issue the next tape command.

Also check if there's not another process holding the tape.

The potential for drive/media failure must be considered too.

Robin

apparently the problem was something related to mechanical motion of the tape.

When the command to eject the tape was issued or button pressed to eject the tape , the tape after few minutes will eject itself but due to some mechanical motion problem it would not come out but again go back inside the drive and it will rewind.

It took some time to figure out this problem.

thanks everyone who took part in this thread