System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Tape eject from command prompt!!!

Yogesh M Puranik
Valued Contributor

Tape eject from command prompt!!!


Hi all,

How to eject the tape from command prompt in HP-UX?? my tape has been stuck inside the tape drive and not coming out by pressing the eject buttion.


Rgds
Yogi
14 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Tape eject from command prompt!!!

If the mechanism is jammed mt(1) may not help:
mt -f tape-device offl
Yogesh M Puranik
Valued Contributor

Re: Tape eject from command prompt!!!

Hi Dennis,


Well i ve tried this option already but it is showing device busy!!

gjprod # mt -f /dev/rmt/0mnb offl
/dev/rmt/0mnb: Device busy


rgds

Yogi
Steven Schweda
Honored Contributor

Re: Tape eject from command prompt!!!

> /dev/rmt/0mnb: Device busy

Can you get fuser or lsof to tell you who's
using the device? (You might need to check
all the related devices, too.)
Jeeshan
Honored Contributor

Re: Tape eject from command prompt!!!

Hi

try this

#mt â t /dev/rmt/Xmn offl
a warrior never quits
Bill Hassell
Honored Contributor

Re: Tape eject from command prompt!!!

If the front panel button does not work, the mt comand will not work either (as you have seen). Hold down the eject button for more than 30 seconds. If this does not work, the tape has become tangled inside and cannot be repaired in the field (tolerances are too tight) so you'll need HP service to replace the drive.


Bill Hassell, sysadmin
Suraj K Sankari
Honored Contributor

Re: Tape eject from command prompt!!!

Hi,
If your drive path is /dev/rmt/0mn
then give

#mt off

it is in different path then

#mt /dev/rmt/1mn off

Suraj
Torsten.
Acclaimed Contributor

Re: Tape eject from command prompt!!!

This likely indicates a hardware problem with the drive. Try to power cycle the tape drive and try again.

This may not solve the problem, but likely you are able to eject the tape.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven Schweda
Honored Contributor

Re: Tape eject from command prompt!!!

How would bad hardware cause "Device busy"?

> Hold down the eject button [...]

Might this not depend on the type of tape
drive? Has anyone said which kind of tape
drive this is?
Torsten.
Acclaimed Contributor

Re: Tape eject from command prompt!!!

How would bad hardware cause "Device busy"?

Another process (a backup) could hang and never come back ... this can keep the device "busy".

Check with fuser.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bill Hassell
Honored Contributor

Re: Tape eject from command prompt!!!

> How would bad hardware cause "Device busy"?

The hardware is trying but it cannot complete the operation internally (the tape is jammed). So the driver can't get back any response and is therefore busy. Unfortunately there is no way to tell whether it is busy with a program or busy internally. Stuck tapes are not uncommon in older drives or drives that have been heavily used and not cleaned regularly. If you could look inside, the tape has likely wrapped itself around the recording head or drive rollers.


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: Tape eject from command prompt!!!

> Unfortunately there is no way to tell [...]

Yow. Ask me why I still use VMS. With a
SHOW DEVICE /FULL command, I can see which
process owns the tape drive, and what it's
doing. And if I do it twice, I can see if
the "Operations completed" count is stuck or
rising.

And the device driver can be expected to
throw an error if the tape gets stuck, too.
Please pardon my incredulity if a gross
hardware error really can't be detected as
such on an HP-UX system.
Dennis Handly
Acclaimed Contributor

Re: Tape eject from command prompt!!!

>Steven: Please pardon my incredulity if a gross hardware error really can't be detected as such on an HP-UX system.

Using STM or some such may detect it?
Also there is "mt -f tape-device status".
Cesare Salvioni
Trusted Contributor

Re: Tape eject from command prompt!!!

hi,

try using st command, usefull for shared tape

Try the following commands:
st -f /dev/rmt/0m -s to see the status
st -f /dev/rmt/0m -r to reclaim the tape

Not sure it would work, but i think it worth a try, you cannot do more damages :-)

hope it helps
Yogesh M Puranik
Valued Contributor

Re: Tape eject from command prompt!!!

closed