by Ras
13. May 2012 19:00
### NFS ##
NFS components
1. NFS Client (mount, /etc/vfstab)
2. NFS Server
3. AutoFS
/etc/default/nfs # default config for nfs
rpcinfo -p # shows services related to nfs and ports
exportfs # shows nfs shared directories
##to export edit /etc/exports onlinux and /etc/dfstab on Solaris
/tempnfs1 *(rw,no_root_squash)
/tempnfs2 192.168.1.50(rw,no_root_squash)
export -a - will reread the /etc/exports file
and then
exportfs - should show the shared folders
##on the remote machine to use nfs client and mount
mount -F nfs -o ro,vers=4 linuxcbtmedia1:/tempnfs1 /localfolder
## Change /etc/vfstab to make nfs share persistent
linuxcbtmedia1:/tempnfs1 - /tempnfs1 nfs - yes ro,vers=3
and mount -a
###NFS share on Solaris
(server)
share -F nfs -d test_share /tempnfssun1
share -- will show if there is any share available
Put the same share command to /etc/dfstab to make it persistance
### AutoFS ###
Features:
1. provides just-in-time mounting of file system
2. Controlled by 'automountd' daemon
3. Managed via autofs service
4. Refrences map files to determine file systems to mount
5. Obviates need to distribute root password to non-privilege users
/etc/default/autofs - contains configuration directoives for autofs
### AutoFS Maps ##
3 types
1. Master map - /etc/auto_master
2. Direct map - /etc/auto_direct
3. Indirect maps - /etc/auto_* - referenced from /etc/auto_master
### /etc/auto_master ###
/etc/auto_master is always read by autofs(automountd daemon)
/etc/nsswitch.conf will be used to find default location for automount
on auto_master
#mount_point map_file mount_options
/home auto_home -nobrowse
#### /etc/auto_home
#key location(full NFS path)
unixcbt1 linuxcbtsun1:/export/home/unixcbt