Operating System - HP-UX
1836658 Members
2081 Online
110102 Solutions
New Discussion

Re: How to list file(s) / directory of tape.

 
Viswanadhan
Regular Advisor

How to list file(s) / directory of tape.

Hi All,

I have questions.

1. How to list file(s) / directory of tape, i donot want to restore to HDD.

When i use the command as
# frecover -f /dev/rmt/2m -i /dba -N

Then i got error message.

2. How i know that tape cartridge is inserted or not in the tape drive.With

# ioscan -fnC tape

tape 2 24.3.0 tape2 CLAIMED DEVICE Quantum DLT4000
/dev/diag/rmt/c6t3d0 /dev/rmt/c6t3d0BEST
/dev/rmt/2m /dev/rmt/c6t3d0BESTb
/dev/rmt/2mb /dev/rmt/c6t3d0BESTn
/dev/rmt/2mn /dev/rmt/c6t3d0BESTnb
/dev/rmt/2mnb

Regards,
Viswanadhan.
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: How to list file(s) / directory of tape.

>2. How i know that tape cartridge is inserted or not in the tape drive

You can use (tapename is one of yours above:
$ mt -f tapename status

I guess this means no tape?
Drive: HP C1533A
Format:
Status: [0]
File: 0
Block: 0
Heiner E. Lennackers
Respected Contributor

Re: How to list file(s) / directory of tape.

Hi Viswanadhan

1) if your tape is a fbackup tape you can read the index file from the last tape with the -I option

2) "mt -t device status" with give the answer on HP-UX 11 (option not available on HP-UX 10)

example:
no tape:
Drive: HP C1533A
Format:
Status: [0]
File: 0
Block: 0

with tape:
Drive: HP C1537A
Format: DDS-2 format
Status: [41112400] BOT online compression immediate-report-mode
File: 0
Block: 0

if this makes any sense to you, you have a BIG problem
Viswanadhan
Regular Advisor

Re: How to list file(s) / directory of tape.

Hi ,

I tried i like this

# mt -t /dev/rmt/2m status
mt: unknown command "status"

or

# mt -f /dev/rmt/2m status
mt: unknown command "status"

# which mt
/usr/bin/mt

Regards,
Viswanadhan
Heiner E. Lennackers
Respected Contributor

Re: How to list file(s) / directory of tape.

what version of HP-UX are you running?

you can try to access the tape by rewinding it (mt -t device rew) and check teh return code. But this could be problematic if your tape is positioned to the end of data or elsewhere.
The returncode if 0 if the rewind was successfull oder 1 if not (which can be interpreted as "no tape")
if this makes any sense to you, you have a BIG problem
Viswanadhan
Regular Advisor

Re: How to list file(s) / directory of tape.

Hi ,

# uname -a

HP-UX Server B.11.00 E 9000/887 486398211 8-user license

Server is very old.
Prasanth Vattoly
Frequent Advisor

Re: How to list file(s) / directory of tape.

You can list /dba directory with -N option of frecover. You should use -N along with -v.


# frecover -f /dev/rmt/2m -v -N -i /dba


Prasanth.
prasanth.v.a
Heiner E. Lennackers
Respected Contributor

Re: How to list file(s) / directory of tape.

Hi,

you should check your patch level. Even HP-UX11.00 have the "status" option for mt if you have the latest patch bundle installed.

Is this a standalone DLT drive or a drive from a library?
If it is a library you may use the mc command to determine if a tape is in the drive or not.

"mc -p
if this makes any sense to you, you have a BIG problem
Prasanth Vattoly
Frequent Advisor

Re: How to list file(s) / directory of tape.

You can also use the command
frecover -xNvf device 2 > index
to show the files on a non-HP format cartridge tape.
prasanth.v.a
Viswanadhan
Regular Advisor

Re: How to list file(s) / directory of tape.

Hi Prasath,

Thanks for help.

Im happy like this

# frecover -xNvf /dev/rmt/2m |pg
Viswanadhan
Regular Advisor

Re: How to list file(s) / directory of tape.

Im happy with help from all.

Regards,
Viswanadhan.