Operating System - HP-UX
1825678 Members
3592 Online
109686 Solutions
New Discussion

Command to find the tapes status in HPUX 10.2

 
HP UNIX Professionals
Frequent Advisor

Command to find the tapes status in HPUX 10.2

Hi Experts,

We have B.10.20 A 9000/803 HP UX box. i want to know the status of tpae in 0mn. Please let me the command to find the tapes status in HPUX 10.2

(Such as mr -f /dev/rmt/Omn status)

Thanks in advance
16 REPLIES 16
James R. Ferguson
Acclaimed Contributor

Re: Command to find the tapes status in HPUX 10.2

Hi:

You could probably do:

# mt -t /dev/rmt/0mn rew

...and examine the return code ($?).

http://docs.hp.com/en/B2355-90128/mt.1.html

Regards!

...JRF...
HP UNIX Professionals
Frequent Advisor

Re: Command to find the tapes status in HPUX 10.2

when i run the mt -t /dev/rmt/0m rew command, getting output like

mt -t /dev/rmt/0m rew
/dev/rmt/0m: No such device or address
# mt -t /dev/rmt/0mb rew
/dev/rmt/0mb: No such device or address
James R. Ferguson
Acclaimed Contributor

Re: Command to find the tapes status in HPUX 10.2

Hi (again):

> when i run the mt -t /dev/rmt/0m rew command, getting output like
mt -t /dev/rmt/0m rew
/dev/rmt/0m: No such device or address
# mt -t /dev/rmt/0mb rew
/dev/rmt/0mb: No such device or address

First, use a Berkley, no-rewind device, like '/dev/rmt/0mnb'.

An 'ioscan -kfnC tape' will show your available tape devices.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: Command to find the tapes status in HPUX 10.2

You need to substitue the correct device file for your tape device. You can find this with the "ioscan -kfnCtape" command. The most common mistake is typing the letter O (oh) instead of 0 (zero). I can't tell from your posting if maybe that's what you've done or not.


Pete

Pete
Johnson Punniyalingam
Honored Contributor

Re: Command to find the tapes status in HPUX 10.2

ioscan -fnC tape

mt -f /dev/rmt0mn rewind

for more information (man mt)
Problems are common to all, but attitude makes the difference
Vishu
Trusted Contributor

Re: Command to find the tapes status in HPUX 10.2

Hi,

First do (to know about the tapes in the server)

# ioscan -fnC tape

then, with the correct device name, perform

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

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

where ? should be replaced with your correct tape drive name.
HP UNIX Professionals
Frequent Advisor

Re: Command to find the tapes status in HPUX 10.2

Hi Jonson

In ioscan -fnC it showing the tape
But when i run the command mt is shoiwn errro

# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 8/16/5.0.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/0mn /dev/rmt/c1t0d0BEST /dev/rmt/c1t0d0BESTn
/dev/rmt/0mb /dev/rmt/0mnb /dev/rmt/c1t0d0BESTb /dev/rmt/c1t0d0BESTnb


# mt -t /dev/rmt/0mn rew
/dev/rmt/0mn: No such device or address
Michal Kapalka (mikap)
Honored Contributor

Re: Command to find the tapes status in HPUX 10.2

hi,

did you try it second time ???

mikap
OldSchool
Honored Contributor

Re: Command to find the tapes status in HPUX 10.2

1) "mt -f /dev/rmt...." note that at 10.20, the "status" command wasn't available. It was added to 11.0 with later patches, and should have been there out of the box with current OS releases

2) can you read or write /dev/rmt/0mn with something like tar?

what does "ls -l /dev/rmt" show?
Martín García
Occasional Advisor

Re: Command to find the tapes status in HPUX 10.2

pls, check the syntax

mt -f

maybe type letter t instead f

regards
OldSchool
Honored Contributor

Re: Command to find the tapes status in HPUX 10.2

at 10.20, both the "-t" and "-f" were supported, although "-t" was noted as "obsolescent".

besides, the errors noted are complaining about the device .....
HP UNIX Professionals
Frequent Advisor

Re: Command to find the tapes status in HPUX 10.2

Hi Experts,

I am getting the following output and I am not able to run Ignite Backup.

# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 8/16/5.0.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/0mn /dev/rmt/c1t0d0BEST /dev/rmt/c1t0d0BESTn
/dev/rmt/0mb /dev/rmt/0mnb /dev/rmt/c1t0d0BESTb /dev/rmt/c1t0d0BESTnb
# mt -t /dev/rmt/0m rew
/dev/rmt/0m: No such device or address
# mt -t /dev/rmt/0mb rew
/dev/rmt/0mb: No such device or address
#




# ls -l /dev/rmt
total 0
crw-rw-rw- 2 bin bin 205 0x010000 Nov 6 02:28 0m
crw-rw-rw- 2 bin bin 205 0x010080 Jun 10 1996 0mb
crw-rw-rw- 2 bin bin 205 0x010040 Nov 16 09:53 0mn
crw-rw-rw- 2 bin bin 205 0x0100c0 Jun 10 1996 0mnb
crw-rw-rw- 2 bin bin 205 0x010000 Nov 6 02:28 c1t0d0BEST
crw-rw-rw- 2 bin bin 205 0x010080 Jun 10 1996 c1t0d0BESTb
crw-rw-rw- 2 bin bin 205 0x010040 Nov 16 09:53 c1t0d0BESTn
crw-rw-rw- 2 bin bin 205 0x0100c0 Jun 10 1996 c1t0d0BESTnb
crw-r--r-- 1 bin bin 205 0xfffffe Jun 10 1996 stape_config
Torsten.
Acclaimed Contributor

Re: Command to find the tapes status in HPUX 10.2

Sure there is a known good tape loaded?

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!   
Jacques Carriere
Regular Advisor

Re: Command to find the tapes status in HPUX 10.2

try
dd if=anyfile of=/dev/rdsk/...

to see if you can write to the device. Do a man on the dd command.

Jacques
Sp4admin
Trusted Contributor

Re: Command to find the tapes status in HPUX 10.2

Does the tape drive show up in the ioscan -fnC tape? If the device isn't claimed it could be a bad tape drive. Some time the tape may not be compatible with the media.

Sp,
OldSchool
Honored Contributor

Re: Command to find the tapes status in HPUX 10.2

"# mt -t /dev/rmt/0m rew
/dev/rmt/0m: No such device or address
# mt -t /dev/rmt/0mb rew
/dev/rmt/0mb: No such device or address
#"


No...you must specify a non-rewind device, as in /dev/rmt/0mnb, as previously noted. I no longer recall what happens (on 10.20) when you give "mt" the wrong type of device.



"I am getting the following output and I am not able to run Ignite Backup. "

gee, the error you're getting might be of use.....

So, basically, you're trying to diagnose a non-functioning tape drive?

Has this drive ever worked?

Has the drive been replaced / moved lately?

SCSI address changed?

Can you "tar" anything to /dev/rmt/0m using a new tape?

Will it read a known good tape?

Anything in syslog?

Is the power indicator light on the drive lit?