Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving a file system remotely

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
aix/perts,

i'm trying to move FS remotely from BOX1 to BOX2.

i created .rhosts for each box, each has its other's hostname. i included each hosts_name and their corresponding IP address under /etc/hosts.

i was able to do the following:

1. host <IP_address> => from each host
2. rsh <hostname> => from each host

THE PROBLEM

from source_machine after the command -

tar -cvf- /usr/xxx | rsh BOX2 &quot;cd /home/yyy | tar -xvf-&quot;

a /usr/xxx/. blocks.
a /usr/xxx/MACHINE 1 blocks.
a /usr/xxx/PARTNUMBER 1 blocks.
a /usr/xxx/VERSION 1 blocks.
a /usr/xxx/bin
tar: Unexpected end-of-file while reading from the storage media.

NOTE: transfer's not successful...
 
The syntax above seems right from what aix doc says....
Moving a file system remotely

One of the easiest methods of moving an entire file system across a network while
preserving permissions, UIDs, and GIDs is to use the tar and rsh commands. By invoking a tar command on the local system that writes the
created archive to STDOUT, and redirecting that archive output to STDIN
of an extracting tar command running on the remote system, no temporary
file is created.

From the source system, enter:

tar -cvf- <path> | rsh <t_mach> &quot;cd <path> tar -xvf-&quot;
(I don't see an extra pipe....I would have though a ; between cd and tar
but what you have should have worked?)

You could try

The tar command still has some
limitations with number of directories.
rsh YOURREMOTEHOST &quot;cd Target Dir; tar -cvf - .&quot; | tar -xvf -

or perhaps nfs mount and then do a copy?

Maybe someone else will see something wrong with it.... maybe buffers...or timeout?
not sure.
 
aixqueen,

thanks....!!!!!

'just like a work-of-art... COMMA works!

tar -cvf- <path> | rsh <t_mach> &quot;cd <path> ; tar -xvf-&quot;
 
in transferring files/FSs just in case you have problem with tape device - both of these works!

1. NFS (export/mount FS)
2. rsh (.rhosts)
 
aix/perts,

'just found out that there's a flaw.... does anyone encountered this before?

when using df -k command:

* for box#1:

1024-blks free %used Iused %Iused Mounted
4169728 1332360 69% 28039 3% /xxy

* for box#2:

1024-blks free %used Iused %Iused Mounted
4194304 97056 98% 45065 5% /yyz

i wanted to copy the whole /xxy to /yyz as i mounted (nfs) /xxy on box#1 to box#2.

RESULT: Not enough space, but other directories/files are copied

any input/ideas what's happening noting /yyz is greater than /xxy in terms of disk space?
 
Were the filesystems on both systems created with exactly the same parameters: same kind of filesystem (standard vs. compressed, for example), same fragment size, same allocation group size, bytes per inode?
 
bi,

instead of:

# tar -cvf- /usrxx | rsh <t_mach> &quot;cd /usrxx ; tar -xvf-&quot;

i tried:

# tar -cvf- /usrxx | rsh <t_mach> &quot;cd / ; tar -xvf-&quot;

*** maybe i just overlooked it ***

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top