Red Flag asianux Server 3 User's Guide: Configuring Server for NFS

Source: Internet
Author: User
Keywords User's Guide ASIANUX NFS server
Tags aliyun configuration configure control directory domain name editor etc

11.2.1 Manual Configuration

Edit exports file

If you prefer to use the http://www.aliyun.com/zixun/aggregation/18444.html "" > text editor to edit the configuration file or you do not have the X Window System installed, you can directly personalize the profile.

/etc/exports files control which directories are exported by Server for NFS in the following format:

directory hostname (options)

The only options you need to specify are sync and one of the async (sync is recommended). If sync is specified, the server does not respond to requests for changes that are made before they are written to disk. For example:

/misc/export swida.example.com (Sync)

Allows users from swida.example.com to mount/misc/export with the default read-only permission, but:

/misc/export swida.example.com (Rw,sync)

Users from Swida.examle.com will be allowed to use Read and write permissions to mount the/misc/export. See host name format for an explanation of the hostname format.

Carefully handle the spaces in the/etc/exports file. If there are no spaces between the host name and the options in parentheses, these options apply only to this host name. If there are spaces between the host name and the options, these options are globally applied.

Each time you change the/etc/exports, you must notify the NFS daemon of the change, or reload the configuration file with the following command:

/sbin/service NFS Reload

Host name format

The host can use the following format:

A host type can be used in a single machine with a fully qualified domain name (which can be resolved by the server), a host name (which can be resolved by the server), or an IP address. A series of machines specified using wildcard characters use "*" or ""? character to specify a string match. Wildcard characters cannot be used in IP addresses; if the reverse DNS lookup fails, the wildcard may happen to work. When you specify wildcard characters in a fully qualified domain name, the dot (.) is not included in the matching item for the wildcard character, for example: *.example.com includes on.example.com, but does not include one.two.example.com. The IP network uses a.b.c.d/z, where the a.b.c.d is the network, and Z is the number of digits (such as 192.168.0.0/24) in the subnet mask. Another acceptable format is A.b.c.d/metmask, where the a.b.c.d is a network, netmask is a subnet mask (such as 192.168.100.8/255.255.255.0). The netgroups format is group-name, where Group-name is the name of the NIS netgroups.

Starting and stopping servers

On servers that export NFS file systems, the NFS service must be running. Use the following command to view the status of the NFS daemon:

/sbin/service NFS Status

Use the following command to start the NFS daemon:

/sbin/service NFS Start

The NFS service is dependent on the Portmap service, and the Portmap service must be guaranteed to start before the NFS service is started, and the Portam service can be shipped with the following command:

/etc/init.d/portmap start

Use the following command to stop the NFS daemon:

/sbin/service NFS Stop

To start the NFS service at boot time, use the following command:

/sbin/chkconfg–level 345 NFS On

You can also use the Chkconfig or service Configuration tool to configure which services to start at boot time.

Resources

Man Handbook, which prompts the correct syntax for NFS and AUTOFS configuration files

For online resources, please refer to Linux NFS-HOWTO from the Linux documentation program by visiting Http://www.tldp.org/HOWTO/NFS-HOWTO/index.html

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.