mt load command doesn't work

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mt load command doesn't work

ap2010
Hi Mark,

loading and unloading a tape using mtx works fine. However, when I do an "mt -f /dev/nst0 offline" the tape is effectively unloaded but not yet removed by the changer. Giving the command "mt -f /dev/nst0 load" should do the trick by "loading" the tape again. Although no error is created this does not happen. The only way to get the tape loaded again is unloading and loading it again using mtx. Is this what is supposed to happen with a real tape/changer combo as well?

Albert
IKP
Reply | Threaded
Open this post in threaded view
|

Re: mt load command doesn't work

IKP
ap2010 wrote
Hi Mark,

loading and unloading a tape using mtx works fine. However, when I do an "mt -f /dev/nst0 offline" the tape is effectively unloaded but not yet removed by the changer. Giving the command "mt -f /dev/nst0 load" should do the trick by "loading" the tape again. Although no error is created this does not happen. The only way to get the tape loaded again is unloading and loading it again using mtx. Is this what is supposed to happen with a real tape/changer combo as well?

Albert
Albert,

The UNIX mt command is not designed to move media within a tape library, this is the role of the mtx command. So whilst mt can unload a tape, this command is not designed to move this media item within the TLU. Rather, mt  unload will move the media away from the tape drive heads to allow either human movement for standalone devices or for another tool to move the media.

As sucjh what you are observing with the software is happening as expected.

The fuill media unload sequence is -

1) Tape drive rewind - (mt  command)
2) Tape drive unload / eject - (mt command)
3) Tape movement from drive to media slot in TLU - (mtx command)

All these steps are covered by the appropriate system calls when performed from backup software.


HtH

IKP
Reply | Threaded
Open this post in threaded view
|

Re: mt load command doesn't work

ap2010
Thank for clearing that up.

I wasn't referring to the moving of the tape in the library. I remembered from old days, when I was juggling tapes, that after using the unload the tapecartridge sticks out of the drive so the picker can pick it up. What I assumed was that the load command in mt loads that tape back in again, like. in real life when one pushes the tape back in.

Anyway, the mt man page says that the load command is not supported with all drives, so no worries (as Mark probably would say).

thanks,

Albert

Reply | Threaded
Open this post in threaded view
|

Re: mt load command doesn't work

Mark Harvey
Administrator

An interesting question..

A "mt -f /dev/stX offline" is similar to pressing the 'eject' button on a CD Player/VHS tape player. In that it ejects the tape but doesn't remove it from the slot.

I'm not certain what would "push the tape back in" in a real library.
I would normally go thru the sequence of using the "mtx" (so something similar) to move the tape from the drive, into a storage slot and the put it back into the drive.

As far as what 'mhvtl' does...
An 'mt -f /dev/stXX offline' will close() the media data files and mark it as unloaded.
The 'vtllibrary' daemon still knows the media is in the drive slot..
You can't issue an 'vtlcmd <> load barcode', as the 'load' switch is only valid for stand alone devices..

In practice, with mhvtl, you do need to logically move the media from the drive slot to a storage (or map) slot and back into the drive.

Cheers
Mark
Regards from Australia
Mark Harvey