Thursday, December 31, 2009

NETWORK FILE SYSTEM (NFS) IN REDHAT LINUX

NETWORK FILE SYSTEM (NFS)

Features:

1. Transparent access to remote file systems

2. Installed by default

3. Uses RPC for communications

Tasks:

1. Export a directory on the server using: /etc/exports
•/path_to_directory IP_ADDR(rw)
•b. /nfs1 192.168.75.10(rw)
•mkdir /nfs1
•start NFS server - 'service nfs start'
•Confirm export(s) - 'exportfs -v'

Note: NFS matches remote user's UID to local /etc/passwd to determine ACLs

2. Export /nfs2
•Create entry in /etc/exports
•Update current exports using: exportfs -a

3. Mount both exports on a remote system
•mount -t nfs 192.168.75.199:/nfs1 /nfs1
•mount -t nfs 192.168.75.199:/nfs2 /nfs2

4. Allow local 'root' user the ability to write to /nfs1 export
•/etc/exports: (rw,no_root_squash)

5. Setup mount points so that they're available upon reboot
•/etc/fstab
•Unmount and confirm that NFS mount points will be available when the client system changes runlevels (reboots, starts, etc.) - 'mount -a' showmount -a 192.168.75.199 - shows mounts on this system (connected NFS clients)

6. Attempt to mount /nfs1 & /nfs2 from an unauthorized system
•Fails because client's IP does not match server's /etc/exports
•Update server's /etc/exports to allow additional hosts/subnet/etc.
•exportfs -a - to update the export table

No comments:

Post a Comment