Mounting NFS Manually mount

You can also use the mount command with the -t explicitly. For a NFSv4 file system you would use -explicitly, use the following command:

rabbit.mytrek.com:/home/projects /home/dylan/projects

rabbit.mytrek.com:/home/projects /home/dylan/projects

Option

Description

rsize=n

The number of bytes NFS uses when reading files from an NFS server. The default is 1,024 bytes. A size of 8,192 can greatly improve performance.

wsize=n

The number of bytes NFS uses when writing files to an NFS server. The default is 1,024 bytes. A size of 8,192 can greatly improve performance.

timeo=n

The value in tenths of a second before sending the first retransmission after a timeout. The default value is seven-tenths of a second.

retry==n

The number of minutes to retry an NFS mount operation before giving up. The default is 10,000 minutes (one week).

retrans=n

The number of retransmissions or minor timeouts for an NFS mount operation before a major timeout (default is 3). At that time, the connection is canceled or a "server not responding" message is displayed.

soft

Mount system using soft mount.

hard

Mount system using hard mount. This is the default.

intr

Allow NFS to interrupt the file operation and return to the calling program. The default is not to allow file operations to be interrupted.

bg

If the first mount attempt times out, continue trying the mount in the background. The default is to fail without backgrounding.

tcp

Mount the NFS file system using the TCP protocol, instead of the default UDP protocol.

Table 38-2 NFS Mount Options

Table 38-2 NFS Mount Options nfs option to mount an NFS file system -t nfs4. To mount the previous entry

You can, of course, unmount an NFS directory with the umount command. You can specify either the local mountpoint or the remote host and directory, as shown here:

umount /home/dylan/projects umount rabbit.mytrek.com:/home/projects

NOTE You can also mount and unmount all your NFS file systems at once with the /etc/rc.d/ init.d/netfs script, which you can invoke with the service command. This script reads the NFS entries in the /etc/fstab file, using them to mount and unmount NFS remote directories. Using the stop argument unmounts the file systems, and with the start argument, you mount them again. The restart argument first unmounts and then remounts the file systems.

0 0

Post a comment