Configure the NFS file system in Linux

Source: Internet
Author: User
The rhel4 version of linux is used in this article. Other versions may be different. Server: 1. Configure/etc/exports format description: All Hosts (192.168.10.0/24) in the host (192.168.1.123)/network segment of the specified IP address in the shared directory (share parameter) /u01/workspace192.168.10.0/24 (rw, sync)/u01/arch

The rhel4 version of linux is used in this article. Other versions may be different.

Server:

1. Configure/etc/exports

Format description:

Shared directory

Host with the specified IP address (192.168.1.123)/all hosts in the network segment (192.168.10.0/24)

(Share parameters)

/U01/workspace 192.168.10.0/24 (rw, sync)

/U01/archives 192.168.10.0/24 (rw, sync)

Nfs access permission description

Ro

Read-only access

Rw

Read/write access

Sync

Write and share all data upon request

Async

NFS can request data before writing data.

Secure

NFS is sent through a secure TCP/IP Port below 1024

Insecure

NFS is sent over port 1024.

Wdelay

If multiple users want to write data to the NFS Directory, group write (default)

No_wdelay

If multiple users want to write data to the NFS Directory, write the data immediately. This setting is not required when async is used.

Hide

Do not share its subdirectories in the NFS shared directory.

No_hide

Sub-directories that share the NFS Directory

Subtree_check

If sub-directories such as/usr/bin are shared, force NFS to check the permissions of the parent directory (default)

No_subtree_check

The parent directory permission is not checked as opposed to the above.

All_squash

The UID and GID of the shared file are mapped to the anonymous user anonymous, which is suitable for public directories.

No_all_squash

Reserve the UID and GID of the shared file (default)

Root_squash

All requests of the root user are mapped to the same permissions as those of the anonymous user (default)

No_root_squas

Root Users Have Full root directory management and Access Permissions

Anonuid = xxx

Specify the UID of an anonymous user in the NFS server/etc/passwd file

2. Restart the nfs service on the server:

Service portmap restart

Service nfs restart

Make the modification take effect

3. Configure the client

Mount-t nfs-o rw, bg, hard, nointr, rsize = 32768, wsize = 32768, timeo = 600, actimeo = 0 192.168.10.121:/u01/archives/u01/archives

Mount-t nfs-o rw, bg, hard, nointr, rsize = 32768, wsize = 32768, timeo = 600, actimeo = 0 192.168.10.121:/u01/workspace/u01/workspace

/Etc/Fstab

192.168.1.101:/Oracle/archive/oracle/archive nfs defaults 0 0

Or/etc/rc. d/rc. local to start the instance.

Mount-t nfs-o rw, bg, hard, nointr, rsize = 32768, wsize = 32768, timeo = 600, actimeo = 0 192.168.10.121:/u01/archives/u01/archives

Mount-t nfs-o rw, bg, hard, nointr, rsize = 32768, wsize = 32768, timeo = 600, actimeo = 0 192.168.10.121:/u01/workspace/u01/workspace

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.