1752341 Members
5786 Online
108787 Solutions
New Discussion юеВ

Ejecting Ignite tape

 
SOLVED
Go to solution
Nikee Reddy
Regular Advisor

Ejecting Ignite tape

Hello Folks,

How can I eject the DDS3 ignite tape from the tape device using the command line option?

Thanks,
Nikee
7 REPLIES 7
Stefan Farrelly
Honored Contributor
Solution

Re: Ejecting Ignite tape

mt -t /dev/rmt/ offl

eg. mt -t /dev/rmt/0m offl
Im from Palmerston North, New Zealand, but somehow ended up in London...
James R. Ferguson
Acclaimed Contributor

Re: Ejecting Ignite tape

Hi Nikee:

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

...for examople.

Regards!

...JRF...
Jeff Schussele
Honored Contributor

Re: Ejecting Ignite tape

Hi Nikee,

If your tape is the default device - /dev/rmt/0mn - then use

mt offl

If not default then use

mt -f /dev/rmt/Xmn offl

where X=instance # EX: 1,2, etc.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Meissner
Esteemed Contributor

Re: Ejecting Ignite tape

lean something new every day....

and i thought i was lazy :)
I usually just hit the button....
All paths lead to destiny
Ian Dennison_1
Honored Contributor

Re: Ejecting Ignite tape

In addition,

mt -f /dev/rmt/0mn rew
if (( $? > 0 ))
then
# print error
fi

I put this one at the start of all my ignite scripts, to get it to detect that there is a tape in the drive. No tape = non-zero Return Code, valid tape = zero Return code.

Share and Enjoy! Ian
Building a dumber user
Patrick Wallek
Honored Contributor

Re: Ejecting Ignite tape

Just an additional comment regarding the mt command:

On HP-UX 11.X 'mt -t' is obsolete. You should actually use 'mt -f /dev/rmt/?mn command', so to eject use:

# mt -f /dev/rmt/?mn offl

If you are still on HP-UX 10.20 then you must use the '-t' as 10.20 does not support '-f'.
Hakki Aydin Ucar
Honored Contributor

Re: Ejecting Ignite tape

I use this scrip to check Tapes:

#!/bin/sh

teypler=$(ioscan -fnC tape | grep mn | awk '/dev/rmt {print $1}')
#echo $teypler

for I in `echo $teypler`
do
RC=$(mt -f $I status |grep Status|awk '{print $2}' |tr -d '['|tr -d ']')
if [ $RC -gt 0 ]
then
echo " There is a tape in the drive of $I :Status[$RC]"
else
echo " Tape Drive is empty [$I]"
fi
done