12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

302CHAPTER 13Network File Sharing1024, but using 8192 greatly improves throughput and is recommended. The timeo valueis the amount of time, in tenths of a second, to wait before resending a transmission afteran RPC timeout. After the first timeout, the timeout value is doubled for each retry for amaximum of 60 seconds or until a major timeout occurs. If connecting to a slow server orover a busy network, better performance can be achieved by increasing this timeoutvalue. The intr option allows signals to interrupt the file operation if a major timeoutoccurs for a hard-mounted share. Refer to the NFS man page with the command man nfsfor a full list of available options.Using /etc/fstab to Connect to the NFS ShareAfter you have verified that the client can mount the share, you can configure the systemto mount it at boot time by modifying the /etc/fstab file as follows:server:/exported/dir /mountpoint nfs rsize=8192,wsize=8192,timeo=14,intrReplace the server name, exported directory, and mount point with the appropriatevalues. The third column indicates that the mount point is of the type nfs.The last column contains a comma-separated list of NFS options. The options in ourexample were explained in the previous section, “Using mount to Connect to the NFSShare.”After the entry is added to /etc/fstab, use the command mount /mountpoint as root tomount the share immediately. Unless the noauto option is specified, it is automaticallymounted at boot time.TIPThe user option can also be used to allow a non-root user to mount the share with themount /mountpoint command. This is useful if the noauto option is used to notmount the share at boot time.Using autofs to Connect to the NFS ShareThe last option is to use autofs. The autofs service works by using the automount daemonto monitor preconfigured NFS mount points. They are only mounted when a userattempts to access the local mount point directory.There are several advantages to using autofs instead of configuring shares in /etc/fstab.Because shares are only mounted when they are accessed, system boot time is faster. Thesystem doesn’t have to wait for each NFS server to respond and the mount to succeed.Secondly, it is more secure. Users on the client systems must know what directory isconfigured to mount the share before changing into that directory to force the mount.On the other hand, if all shares are mounted on bootup, users can browse the contents ofthe shared directory if they have permission. If the system is compromised by an unauthorizeduser, having the shares pre-mounted makes it that much easier for the intruderto find the shared files. Finally, if the clients are configured to use NIS for user authentication,NIS can also be configured to provide the /etc/auto.* files necessary for autofs. So,when a share needs to be added, modified, or removed, the administrator just needs to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!