Operating System - HP-UX
1826329 Members
3441 Online
109692 Solutions
New Discussion

Cpio won't restore in a certain directory.

 
SOLVED
Go to solution
Howard Marshall
Regular Advisor

Cpio won't restore in a certain directory.



This is not a critical thing but an interesting thing I came across

Has anyone ever had a case where cpio would not restore files in a certain mounted directory

I am going through the process of replacing a few disk drives and found that when I create a directory /hmnt and mount a file system on it I can not do a cpio recover. I don't know why. I can mount the same file system on another mount point, a directory I created in /tmp the same way I created /hmnt (with the mkdir command) and cpio has no problem with it. I can touch or create files no problem from the command line. Cpio just sits there longer almost like its waiting on something.

Any ideas or answers?
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Cpio won't restore in a certain directory.

Is this local filesystem or an NFS filesystem? The first thing I would do is umount the filesystem and do an ls -l mountpoint to see the mode of the underlying mountpoint directory. I'm betting they are very restrictive. When you run cpio, are you running as the same user as when you excute the other commands you mention?
If it ain't broke, I can fix that.
Howard Marshall
Regular Advisor

Re: Cpio won't restore in a certain directory.

Both directories that I used as mount points are 777 and I am root when I run the commands.

The only difference I can see in them is one is in the root directory and one is in /tmp
Rodney Hills
Honored Contributor

Re: Cpio won't restore in a certain directory.

Do you have root access on the NFS mounted folder?

Without it root is restricted on the remote system.

HTH

-- Rod Hills
There be dragons...
Howard Marshall
Regular Advisor

Re: Cpio won't restore in a certain directory.

its all local file systems.
A. Clay Stephenson
Acclaimed Contributor

Re: Cpio won't restore in a certain directory.

Okay, humor me and do a few things and post the results:

umount the filesystem.

ls -l /
and then ls -l /tmp (if that is where the "good" mount is working)

Now mount the filesystem on /hmnt and do an ls -la /hmnt

bdf

df -kt

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Cpio won't restore in a certain directory.

There is one more thing that could do you in. Consider the case where you are cpio'ing from a file /hmnt/my.cpio that is itself restoring /hmnt/my.cpio, the cpio image could overwrite itself. It would be a good idea to also
cpio -i[c]vt < my.cpio and post that listing.
If it ain't broke, I can fix that.
Howard Marshall
Regular Advisor

Re: Cpio won't restore in a certain directory.

I don't seem to have time to mess with this right now but when I get time, if the problem still exists I will bring it back up.

for now though I am closing the thread
thanks

H