Comparing file systems on different machines

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.

The information in this how-to scenario was tested using specific versions of AIX®. The results you obtain might vary significantly depending on your version and level of AIX.

  1. Log in to the remote host as the root user.
    For example:
    tn juniper.mycompany.com
    
    
    AIX Version 6.1
    (C) Copyrights by IBM and by others 1982, 2002.     
    login: root                                         
    root's Password:                                    
  2. 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
  3. Save your changes and exit the remote connection.
  4. 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
  5. 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 ;
  6. Save the file and exit the editor. The compareFS file is used as the distfile for the rdist command in the following step.
  7. 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.