Operating System - HP-UX
1825775 Members
2127 Online
109687 Solutions
New Discussion

/dev/rmt/0mn: Device busy

 
80skeys
Frequent Advisor

/dev/rmt/0mn: Device busy

rx8640 running HP-UX 11.31 with an Ultrium II scsi tape drive attached directly to the back of the server.

When I try to use the device or check it's status, it tells me device busy, even though the device does not show up in any running processes or in fuser.

How can I release this device so I can use it?

rmgjt-ap#/opt/sybase/ASE-15_0/install> mt -f /dev/rmt/0mn status
on tape open: Device busy
rmgjt-ap#/opt/sybase/ASE-15_0/install> ps -ef | grep 0mn
root 10657 7732 0 13:22:42 pts/0 0:00 grep 0mn
rmgjt-ap#/opt/sybase/ASE-15_0/install> fuser /dev/rmt/0mn
/dev/rmt/0mn:
20 REPLIES 20
Vipin Kumar
Occasional Advisor

Re: /dev/rmt/0mn: Device busy

Hi,

This link may help you..

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=799634

Are there any process running like tar,dd , Cross check for any backup software running in the server.
Cross check iostat outputs..


Regards
Vipin
rariasn
Honored Contributor

Re: /dev/rmt/0mn: Device busy

Hi,

Install "lsof" utility.

Sample use:

# lsof /dev/rmt/35mn

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bma 9361 root 10u CHR 205,0xdb7340 0x929f4000 8558 /dev/rmt/35mn

rgs,
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

Data Protector is installed, however there are no omni related processes running:

rmgjt-ap#/opt/omni> ps -ef | grep omni
root 5369 5591 0 08:28:07 pts/3 0:00 grep omni


Where do I grab lsof from? I googled lsof for HP-UX, but there appears to be just old links that don't work anymore.
Torsten.
Acclaimed Contributor

Re: /dev/rmt/0mn: Device busy

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.83/


There are other device files related to this device too (not only 0mn), see

# ioscan -fnkCtape

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!   
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

I downloaded the lsof*gz file to my server. I'm not experienced with using software depots on HP. Can you give me a set of instructions for installing this software?
Torsten.
Acclaimed Contributor

Re: /dev/rmt/0mn: Device busy

Download http://hpux.connect.org.uk/ftp/hpux/Sysadmin/lsof-4.83/lsof-4.83-ia64-11.31.depot.gz

gunzip it (e.g. to /tmp) and run

# swinstall -s /tmp/lsof-4.83/lsof-4.83-ia64-11.31.depot

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!   
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

Successful install, but the command does not work:

rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/0mn
lsof: FATAL: pst_stream_size should be: 672; is 72
Torsten.
Acclaimed Contributor

Re: /dev/rmt/0mn: Device busy

maybe this helps:

http://hpux.connect.org.uk/hppd/cgi-bin/wwwtar?/hpux/Sysadmin/lsof-4.83/lsof-4.83-src-11.11.tar.gz+lsof-4.83/HPUX.Install+text

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!   
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

I installed the 11.23 version of lsof and this works. I tested it on /tmp and it works. When I run it on the tape device, it shows nothing is using it:

rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/0mn
rmgjt-ap#/tmp>


Next step??
Torsten.
Acclaimed Contributor

Re: /dev/rmt/0mn: Device busy

As said, there are other device files related to this device too (not only 0mn), see

# ioscan -fnkCtape


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!   
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

lsof shows nothing running on any of the tape device files:

80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

Status still "busy"

rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/0mn
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/0m
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/0mnb
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/c3t1d0BEST
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/c3t1d0BESTb
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/c3t1d0BESTn
rmgjt-ap#/tmp> /usr/local/bin/lsof /dev/rmt/c3t1d0BESTnb
rmgjt-ap#/tmp> mt -f /dev/rmt/0mn status
on tape open: Device busy
James R. Ferguson
Acclaimed Contributor

Re: /dev/rmt/0mn: Device busy

Hi:

Did this setup ever work? If so, you may simply have a defunct tape drive.

Regards!

...JRF...
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

Yes the setup was working up until two days ago.

At that time, I was running a database backup through Data Protector. It got interrupted - the database crashed - and left the device in a hung state.

I'm talking to HP technical support and they're telling me the only option is to reboot. This isn't an option for us, and to be honest, I would think there should be a cleaner solution for a stable, Unix OS like HP-UX.
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

Anybody know if there's a "factory reset" button on the HP StorageWork Ultrium 460?
Steven Schweda
Honored Contributor

Re: /dev/rmt/0mn: Device busy

> [...] I would think there should be a
> cleaner solution for a stable, Unix OS like
> HP-UX.

See where optimism gets you?

One possibility would be to change the SCSI
ID on the tape drive (to some safe, currently
unused-on-this-bus value), then go through
the OS-specific SCSI-device-discovery
procedure, and finally relax and enjoy using
your "new" tape drive. (Until it goes nuts,
too.)
rariasn
Honored Contributor

Re: /dev/rmt/0mn: Device busy

80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

HP-UX has been around for decades, you would think that it would be possible to reset a hung tape drive without rebooting!

rariasn: thanks for the documentation link
steven: thanks for the scsi suggestion, i'll try it.
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

I powered off the tape drive, changed the scsi id from 1 to 2, powered it on and did an ioscan. Here's the results, the first entry was the drive with id 1, the second is with id 2. mt commands don't work on either, they say "busy" for the first one and "no such address" for the second.

rmgjt-ap#/local/data_protector> ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
tape 0 0/0/0/3/1.1.0 stape NO_HW DEVICE HP Ultrium 2-SCSI
/dev/rmt/0m /dev/rmt/c3t1d0BEST
/dev/rmt/0mb /dev/rmt/c3t1d0BESTb
/dev/rmt/0mn /dev/rmt/c3t1d0BESTn
/dev/rmt/0mnb /dev/rmt/c3t1d0BESTnb
tape 3 0/0/0/3/1.2.0 stape CLAIMED DEVICE HP Ultrium 2-SCSI
/dev/rmt/3m /dev/rmt/c3t2d0BEST
/dev/rmt/3mb /dev/rmt/c3t2d0BESTb
/dev/rmt/3mn /dev/rmt/c3t2d0BESTn
/dev/rmt/3mnb /dev/rmt/c3t2d0BESTnb
rmgjt-ap#/local/data_protector> mt -f /dev/rmt/0mn status
on tape open: Device busy
rmgjt-ap#/local/data_protector> mt -f /dev/rmt/3mn status
on tape open: No such device or address
80skeys
Frequent Advisor

Re: /dev/rmt/0mn: Device busy

I can do a scsimgr get_attr -D /dev/rtape/tape1_BEST.

But when I run scsimgr cold_bdr here's what it says:

scsimgr: ERROR: Cannot open pass-through device for /dev/rtape/tape1_BEST : No such device or address.
The LUN or all its I/O paths may be disabled.