Operating System - HP-UX
1830385 Members
2370 Online
110001 Solutions
New Discussion

how to extract a file from media of make_tape_recovery

 
chuanpeng.wang
Frequent Advisor

how to extract a file from media of make_tape_recovery


On one system

mt -f /dev/rmt/0m rew
mt -f /dev/rmt/0mn fsf 1
tar xvf /dev/rmt/0mn /etc/hosts
IO error.

On the other system

mt -f /dev/rmt/1mn rew
mt -f /dev/rmt/1mn fsf 1
tar tvf /dev/rmt/1mn
Tar: blocksize = 2

then
mt -f /dev/rmt/1mn rew
mt -f /dev/rmt/1mn fsf 22
tar tvf /dev/rmt/1mn It is OK.
tar xvf /dev/rmt/1mn /etc/hosts

The file is not extracted and there is no error returned.


What's the problem?
Thanks.


8 REPLIES 8
Peter Godron
Honored Contributor

Re: how to extract a file from media of make_tape_recovery

Hi,
are you talking about the same tape ?
First System
fsf 1
Second System
fsf 1

then fsf 22 ??

When you say tar tvf /dev/rmt/1mn It is OK does that mean /etc/hosts is shown in the listing ?

You may need to re-position the tape to the correct fileset.
chuanpeng.wang
Frequent Advisor

Re: how to extract a file from media of make_tape_recovery

Thanks.

the sencond and third tests are on the same tape.

In the third test, I can find files, but extract it failed.

How to re-position the tape to the correct fileset?
rariasn
Honored Contributor

Re: how to extract a file from media of make_tape_recovery

Hi chuanpeng.wang,

Possible incompatibility of dds drive on host1 and host2.

Drives and Media are only backwards compatible.

rgs.
chuanpeng.wang
Frequent Advisor

Re: how to extract a file from media of make_tape_recovery

Hi rariasn

You misunderstood.
I did the test just after make_tape_recovery on the same server.

I have two servers and two tapes.
perumal_2
Frequent Advisor

Re: how to extract a file from media of make_tape_recovery

Hi


To extract a single file from the make_tape_recovery image

use the belwo syntax
# /usr/bin/mt -t /dev/rmt/1mn rew
# /usr/bin/mt -t /dev/rmt/1mn fsf 1
# /usr/bin/tar xvf /dev/rmt/1m filename

I could see you have used 1mn, use only 1m in the last command.

TQ
Perumal
Fabio Ettore
Honored Contributor

Re: how to extract a file from media of make_tape_recovery

Hi,

I will try to give you my thoughts:

- the method to extract files from make_tape_recovery tape is:

1) ioscan -fnCtape
be sure the device file for tape is /dev/rmt/0mn (I will suppose it is);

2) use 'no rewind' device files on both mt commands (I see you used 'mt -f /dev/rmt/0m rew' on one system, I don't know whether it is just a typo or you really used it). Anyway the right method is:

mt -f /dev/rmt/0mn rew
mt -f /dev/rmt/0mn fsf 1
tar xvf /dev/rmt/0mn etc/hosts

I wouldn't use the '/' on etc/hosts.

Try those steps and let me know if you have still problems. If you see again I/O error I would suppose you are experiencing a problem to read the tape.

Best regards,
Fabio
WISH? IMPROVEMENT!
Victor Fridyev
Honored Contributor

Re: how to extract a file from media of make_tape_recovery

Hi,

The sequece with fsf must work, if the tape has been created properly.

mt -f /dev/rmt/0m rew
mt -f /dev/rmt/0mn fsf 1
tar xvf /dev/rmt/0mn

The only question: there is an option in make_tape_recovery to use cpio instead of tar. Could you check this ?

HTH

Entities are not to be multiplied beyond necessity - RTFM
chuanpeng.wang
Frequent Advisor

Re: how to extract a file from media of make_tape_recovery

mt -f /dev/rmt/0m rew
mt -f /dev/rmt/0mn fsf 1
tar xvf /dev/rmt/0mn

This is OK.
Thanks.