Operating System - HP-UX
1751980 Members
4866 Online
108784 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?