1752802 Members
5874 Online
108789 Solutions
New Discussion юеВ

cpio on hp-ux 10.20

 
SOLVED
Go to solution
Tammy Liang
Regular Advisor

cpio on hp-ux 10.20

I tried to restore a cpio file from tape with command " cpio -idcmv < /dev/rmt/0m". I got "End of Volume. If you want to go on, type device/file name when ready"
What is "End ov Volume" mean?
I enter "/dev/rmt/0m" and see the size of restored file increased.
What's the cpio command for listing the content of the tape drive?

Thanks for any reply.

Tammy
take easy, enjoy life
16 REPLIES 16
Pete Randall
Outstanding Contributor

Re: cpio on hp-ux 10.20

You might need to rewind the tape first:

mt rew

It sounds to me like you're at the end of the tape.


Pete

Pete
Tammy Liang
Regular Advisor

Re: cpio on hp-ux 10.20

I did not rewind the tape,just enter the tape device file /dev/rmt/0m. Does cpio rewind on its own?
tks
take easy, enjoy life
Johnson Punniyalingam
Honored Contributor

Re: cpio on hp-ux 10.20

Hi Tammy,

>>> I did not rewind the tape,just enter the tape device file /dev/rmt/0m. Does cpio rewind on its own? <<

NO, It doesn't rewind on its own. we have to rewind , please follow the rewind command

# mt -f /dev/rmt/0mn status
(will show you tape is ONLINE)

# mt -f /dev/rmt/0mn rewind

Than try with cpio command for Listing .. :)

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor
Solution

Re: cpio on hp-ux 10.20

>What is "End of Volume" mean?

It means what it says. You are at the end of the tape reel. You need to "mount" another.

>I enter "/dev/rmt/0m"

I assume you first ejected the tape and put the next volume there?

>What's the cpio command for listing the content of the tape drive?

I suggest you give up on tar(1) and cpio(1) and only use pax(1).
You simply use:
pax -tv -f /dev/rmt/0m

>Pete: You might need to rewind the tape first

Are you suggesting the tape was first written and now read, without rewinding?
Tammy Liang
Regular Advisor

Re: cpio on hp-ux 10.20

All,
Thanks for the reply.I did not eject/rewind the tape. I just entered the same device name and cpio append the file to the same file name. Looks like cpio handle the rewind part.

Tammy
take easy, enjoy life
Tammy Liang
Regular Advisor

Re: cpio on hp-ux 10.20

All,
How can I setup block size with cpio to restore file?
I'm using "cpio idcmv < /dev/rmt/0m".

Thanks.
take easy, enjoy life
OldSchool
Honored Contributor

Re: cpio on hp-ux 10.20

as far as I know, you can't. it is what it is.

man "cpio" seems to indicate that it deals in 512 byte blocks.

one wonders why you ask
Dennis Handly
Acclaimed Contributor

Re: cpio on hp-ux 10.20

>How can I setup block size with cpio to restore file? I'm using "cpio idcmv < /dev/rmt/0m".

Do you know what the block size is? You have N options, use -B for 5120 bytes, use a pipe with dd to reblock or good old pax(1).

>OldSchool: as far as I know, you can't. it is what it is. one wonders why you ask

See above. It would also be helpful to know how it was written to tape?

Also, as I mentioned, pax(1) will magically figure out how to read your tape. See:
-b blocking Blocking is automatically determined on input.
Tammy Liang
Regular Advisor

Re: cpio on hp-ux 10.20

I don't know how the file cpio to tape.
It was old tape that we need to restore for
oracle data. After restore the file
with cpio, oracle import failed. I restored
the files from 2 different tapes, and imp failed on both of export files.
So the bottom line is you can not setup block size for cpio when restore from the tape drive.
take easy, enjoy life