N E T S H E L L

( A ROOF FOR NET BEGINNERS )

5. CACHE FILE SYSTEM 

 

  • Cache FS is used to improve the performance of remote file syste.
  • When Cache FS is enabled, the data read from the remote FS (or)  CD- ROM  is stored in disk based cache on the local system.
  •  Frequently accesing request to the same data are fulfilled by the cache.

Configuring Cache FS in a NFS environment :

                                                                                     

                          NFS Server ( host1 )                      NFS Client ( host2 )

                    ( MAN installed )                      ( MAN not installed )

 A  Software which is available in host1 called "SUNWman" is to be shared in network and host2   machine on network want to mount the "SUNWman"  which is shared in host1 as a local file resource.   After Mounting the man software in host2, the user can view the man pages in host2.

When accessing the man pages in host2 , the man page will be downloaded in the local cache and it is displayed to user, if the same man command is used , it will be display the page from the local cache instead of fetching the remote file system.

IStep : 1

        Share the "/usr/share/man" folder in host1. Edit the file /etc/dfs/dfstab for permanent sharing

                 share   -F    nfs     /usr/share/man

Step : 2

        Start the NFS Server daemons on NFS server ( host1) 

                #  /etc/init.d/nfs.server   start

Step : 3

        Verify the folder "/usr/share/man" is shared in host1

               #  dfshares

Step : 4

        Create a Local mounting point in host2 .

                #  mv   /usr/share/man   /usr/share/man.org

                #  mkdir  /usr/share/man

Step : 5

         Create a  cache folder using the command cfsadmin

                  # cfsadmin -c  /cache/cache0

( note : make sure the cache dir is available in root , if not create it )

Step : 6 

  Mount the "/usr/share/man" in NFS client ( host2 ) using cache fs . 

# mount -F cachefs -o backfstype=nfs,cachedir=/cache/cache0      host1:/usr/share/man       /usr/share/man

Step : 7

   Enable Snoop command to check the transaction of packets between host1 and host2

            #  snoop -P  host1   host2

Step : 8 

      Issue a Man command in host2 and the man pages will be listed

                 #  man ls

  • Note down the messages appears in snoop window
  • Again repeat the same command "man ls " and note down the snoop.
  • This  time you cannot find more transaction from host1, it means that it is displaying from local cache.

  Solaris Topics )

Hosted by www.Geocities.ws

1