Implemented by most if not all nix-type OSs(Solaris/AIX/Linux/FreeBSD)
NFS seamlessly mounts remote file systems locally
NFS Components include:
1. NFS Client (mount(temporary access), /etc/vfstab)
2. NFS Server
3. AutoFS
NFS versions 3 & higher supports large files (>2GB)
NFS Major versions:
2 - original
3 - improved upon version 2
4 - current version
Note: Solaris 10 simultaneously supports ALL NFS versions
/etc/default/nfs - contains defaults for NFS server & client
Note: client->server NFS connection involves negotiation of NFS version to use
###Steps for mounting remote file systems###
1. ensure that a local mount point exists & is empty
Note: local mount points with files and/or directories will be unavailable while a remote file system is locally-mounted
2. ensure that NFS server is available and sharing directories
3. mount locally the remote file system.
mount -F nfs -o ro linuxcbtmedia:/tempnfs1 /tempnfs1
Note: use 'man mount' to determine mount options for various FSs
4. setup persistent mounts in /etc/vfstab file
###Steps for sharing local file systems locations###
1. ensure that NFS is running
svcs -a | grep -i nfs
Note: you may enable the NFS server and update share information independently
Start using: svcadm svc:network/nfs/server
Note: NFS Server will NOT start if there are NO directories to share
2. share -F nfs -d test_share /tempnfssun1 - exports for current session. Does NOT persist across reboots
3. Configure NFS sharing for persistence, using share command
share -F nfs -d test_share /tempnfssun1
shareall
Note: consult 'man share_nfs' for permissions info.
###AutoFS###
Features:
1. Just-in-time mounting of file systems
2. Controlled by 'automountd' daemon
3. Managed via autofs service
4. References map files to determine file systems to mount
5. Obviates need to distribute root password to non-privileged users
/etc/default/autofs - contains configuration directives for autofs
###AutoFS Maps###
3 Types:
1. Master map - /etc/auto_master
2. Direct map - /etc/auto_direct - facilitates direct mappings
3. Indirect map - /etc/auto_* - referenced from /etc/auto_master
###/etc/auto_master###
Note: /etc/auto_master is always read by autofs(automountd daemon)
/etc/nsswitch.conf - used to determine lookup location for automount
-hosts - references hosts defined in /etc/hosts & the hosts MUST export shares using NFS
Note: changes to /etc/auto_master(primary autofs policy file) usually requires a service restart: svcadm restart autofs
Note: AutoFS defaults to permitting client to browse potential mount points
###Direct mapping example###
Note: Direct mappings seamlessly merge remote exports with local directories
Steps:
1. create auto_direct mapping in /etc/auto_master:
/- auto_direct -vers=3
Sunday, July 5, 2009
Network File System(NFS) Notes
Labels:
UNIX
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment