2007年6月1日星期五

Compare File Systems on Different Machines
怎样比较不同AIX机器的文件系统

When file systems that exist on different machines should be identical but you suspect one is damaged, you can compare the file systems. The following procedure describes how to compare the attributes of a file system that resides on your current host (in this scenario, called orig_host) to the same file system on a remote host.

Log in to the remote host as the root user. For example:
tn juniper.mycompany.com


AIX Version 5
(C) Copyrights by IBM and by others 1982, 2002.
login: root
root's Password:
Using your favorite editor, edit the remote host's .rhosts file to add a stanza that allows the root user to execute secure remote commands. Use the following format for the new stanza:
orig_host root
The resulting .rhosts file might look similar to the following:
NIM.mycompany.com root
nim.mycompany.com root
host.othernetwork.com root
orig_host.mycompany.com root
Save your changes and exit the remote connection.
With root authority on orig_host, create another file using your favorite editor. For this scenario, the new file is named compareFS. For example:
vi compareFS
Insert the following text in this file, where FSname is the name of the file system that you want to compare, and remote_host is the name of the host on which the comparison file system resides:
FSname -> remote_host
install -v ;
Note:
In the install command line of this file, there must be a space between the -v parameter and the semicolon (;).
For example:

/home/jane/* -> juniper.mycompany.com
install -v ;
Save the file and exit the editor. The compareFS file is used as the distfile for the rdist command in the following step.
Type the following at the command prompt:
/usr/bin/rdist -f compareFS
Or, if you expect a significant amount of output from the comparison, send the output to a file name. For example:
/usr/bin/rdist -f compareFS > compareFS_output
The output lists any differences between the file systems.

For More Information
The rdist command description in AIX 5L Version 5.2 Commands Reference.
The ".rhosts File Format for TCP/IP" in the AIX 5L Version 5.2 Files Reference.
"Understanding the Secure Remote Commands" in the AIX 5L Version 5.2 Security Guide.

0 评论: