NFS Server Client setting command (1)

Source: Internet
Author: User

NFS Server is used through some settings. Here we will mainly explain the operations on the client. I hope you can understand the usage of these commands through the article. For more information, see.

Client operations:

1. The showmout command is helpful for NFS operations and troubleshooting. Let's take a look at the usage of showmount.

Showmout

-A: this parameter is generally used on the NFS Server and is used to display the cline machine that has mounted the local nfs directory.

-E: displays the export directory on the specified NFS Server.

For example:

 
 
  1. showmount -e 192.168.0.30  
  2. Export list for localhost:  
  3. /tmp *  
  4. /home/linux *.linux.org  
  5. /home/public (everyone)  
  6. /home/test 192.168.0.100 

2. mount the nfs directory:

Mount-tNFShostname (orIP):/directory/mount/point

Example:

 
 
  1. Linux: mount -tNFS192.168.0.1:/tmp /mnt/nfs  
  2. Solaris:mount -FNFS192.168.0.1:/tmp /mnt/nfs  
  3. BSD: mount 192.168.0.1:/tmp /mnt/nfs 

3. Other optional parameters of mount nfs:

HARD mount and soft mount:

HARD: NFSCLIENT constantly tries to connect to the SERVER in the background, does not provide any prompt information, some versions in LINUX will still give some tips), until the MOUNT.

SOFT: it will try to connect to the SERVER on the frontend, which is the default connection method. When an error message is received, the mount attempt is terminated and related information is provided.

Example: mount-FNFS-o hard 192.168.0.10:/nfs

Whether it is hard or soft depends on the information you access. For example, if you want to run x program through NFS, you will never expect that due to some unexpected situations, such as sudden slow network speeds, the NIC plug will be plugged in) the system outputs a large number of error messages. If you use the HARD method, the system will wait until it can establish a new connection with the NFS Server for transmission. In addition, if it is non-critical data, you can also use the SOFT method, such as FTP data, so that the session process will not be suspended when the remote machine is temporarily unable to connect or shut down.

Rsize and wsize:

File Transfer size setting: V3 does not limit the transmission size. V2 can only be set to 8 KB at most. You can use-rsize and-wsize to set the file transfer size. The setting of these two parameters has a great impact on the NFS execution efficiency.

Bg: If the mount operation fails, the system transfers the mount operation to the background and continues to try the mount operation until the mount operation is successful. In general, bg should be used when setting the/etc/fstab file to avoid the startup speed being affected due to the possible mount failure)

Fg: the opposite of bg. It is the default parameter.

Nfsvers = n: sets the NFS version to be used. The default value is 2. The setting of this option depends on whether the server supports nfs ver 3.

Mountport: Specifies the mount port.

Port: Set the port based on the export output from the server. For example, if the server uses port 5555 to output NFS, the client needs to use this parameter for the same setting.

Timeo = n: set the time-out period. When data transmission encounters a problem, the system tries to re-transmit the data based on this parameter. The default value is 7/10 seconds ). If the network connection is not very stable, we recommend that you increase the value and use the hard mount method. We recommend that you also add the INTR parameter so that you can terminate any pending file access.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.