1834454 Members
2247 Online
110067 Solutions
New Discussion

Automatic DAT tape eject

 
SOLVED
Go to solution
Edward McCouch
Frequent Advisor

Automatic DAT tape eject

I wrote a script that checks for the existence of a DAT tape, checks the write protection and then eventually starts a make_tape_recovery script. Now I would like to add a line that ejects the tape.

The mt command doesn't seem to have an eject command and I am not sure what other commands I should be looking at. Any help would be appreciated.

OS= Hp-UX 11.11
Server= rp5470s
DAT tape= DDS4s & DDS3s

Thanx in advance.
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: Automatic DAT tape eject

Try "mt offl"


Pete



Pete
James R. Ferguson
Acclaimed Contributor

Re: Automatic DAT tape eject

Hi:

Use this:

# mt -t /dev/rmt/0m offl

Regards!

...JRF...
John Poff
Honored Contributor

Re: Automatic DAT tape eject

Hi,

I've done it before with the 'mt' command. Try this:

mt -f /dev/rmt/0m offl

and see if it doesn't eject your DDS tape.

JP
Uday_S_Ankolekar
Honored Contributor

Re: Automatic DAT tape eject

offl option in mt command should do this.

-USA..
Good Luck..
David Burgess
Esteemed Contributor

Re: Automatic DAT tape eject

Hi,

If the tape is /dev/rmt/0m

I use :-

mt -f /dev/rmt/0m offline

Regards,

Dave.
curt larson_1
Honored Contributor

Re: Automatic DAT tape eject

sounds like a very useful script. I'm sure a few of us would love to have a copy. So, if you can it would be nice if you could post a copy.

isn't there a favorite sys admin scripts thread, if you post it there you can even get points for it.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
Edward McCouch
Frequent Advisor

Re: Automatic DAT tape eject

Thank you all for responding so fast. I feel a bit foolish--I looked at the man page and saw the offl, but for some reason I thought that would make the tape drive go offline. I think I need to drink some more coffee.

I'd post the script, but it is very crude and barbaric, although if you want a good laugh, I'll seek out that thread and post it in there. I'm a beginner so the script is just a bunch of cobbled together commands and lacks the elegance of most of the scripts that I've seen.

Thanx again!
-Ed

Steven E. Protter
Exalted Contributor

Re: Automatic DAT tape eject

I've just tested this command and it works equally well on Ultrium Tape Drives.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com