I am migrating my NFS server running on HP-UX 11.31 to Redhat 8
The filesystem is VXFS going to XFS. This 2 terabytes in size.
I was able to create a tar file but not able to extract the tar file. No error showed on output it finished without extracting.
i tried command as root> find /folder -xdev -print |cpio -pdmuv /swings
seems to work but any files own by noboly root took over
i tried same command as gegular user but all users belong to same group in my case >find /folder -xdev -print |cpio -pdmuv /swings
all files anf folder ownership changed to the user who ran the command.
I tried the same command above, but this time cpio copying from one network to another network, it took about 15 hours!
I know that certainly on earlier versions of HP-UX 11, even after the switch to Itanium, the tar command (ostensibly to "maintain operability with standards", or somesuch) still did not allow you to create files bigger than 8GB. So that might be the issue here - your archive might be incomplete, unless this issue has since been addressed in HP-UX 11.31. It may be worth looking at the man page for tar and seeing if this limitation is still in place. If it is, you could try GNU tar instead maybe, if it's available on your HP system ?
Alternatively, do you have rsync available on your HP-UX box, or can it be made available ? That might be one way of doing things.
One last thought that occurs: could you get the new RHEL 8 box to NFS mount the VxFS filesystem from the HP-UX box, and then rsync/tar/etc. the files from the HP-UX NFS mount point on the RHEL box to the new XFS filesystem on the RHEL server ?
May lead to what you have if you have tangled links in that FS
therefore I would use:
find /folder -xdev -print |cpio -pdmul /swings
l option instead of v, go and read the man pages of cpio on what it does, and I am sure you will remember for ever after...
About nobody hmmm this has always been tricky: how do we secure network file systems? The question should bring to your mind, should I allow files with root permission from remote, what about unknown users, and on NFS mounted should root have access etc...
In other words there some configuration in NFS that deals with that, I am talking of NFS3 because I can't remember having worked with NFS4 on HP-UX, last time I touched an HP-UX was maybe 8 years ago when I had to migrate what we had left...
You would find the granting options in /etc/exports file
such as granting root access to which clients..
an interesting one: -anon=uid a request from unknown user is granted access with uid, -2 is usually nobody...
So I think you should have a look on both sides, server and client configuration files to be sure you are coherent
a classic: -anon=65534 is access to unknown user is not granted combined with root being nobody ( so root has no access...)
You must be root to do the copy ( in order to keep all other users perms etc...)
then you can always have a look if you find no clues by doing a bit of troubleshooting with nfsstat
if you have anything in fields like badcalls, timeout, nullrecv, badlen, then you must investigate as errors are occurring...
Here are a few suggestions for resolving the issues you're facing:
==> When using tar to create and extract the archive, make sure to use the -p flag to preserve permissions and ownership. For example, to create the archive, use the following command:
tar -czpf /path/to/archive.tar.gz /folder
And to extract the archive, use:
tar -xzpf /path/to/archive.tar.gz -C /swings
==> If you want to use cpio instead of tar, you can try using the -R flag to specify the user and group ownership. For example, as root, you could use the following command:
find /folder -xdev -print | cpio -pdmuv -R root:root /swings
This will set the ownership of all files and directories to root:root. As a regular user, you can use:
find /folder -xdev -print | cpio -pdmuv -R user:group /swings
Replace user and group with the appropriate user and group ownership.
==> If you're copying the files over the network, you may want to consider using a tool like rsync instead of cpio
& rsync can be used to copy files and directories over a network while preserving ownership and permissions. For example:
rsync -avz /folder user@remote:/swings
This will copy the contents of /folder to the remote machine at /swings while preserving ownership and permissions.