Build Linux NFS Server for the enterprise on the road

Source: Internet
Author: User

nfs:network File System (Network filesystem)

file system works in user space

Rpc:remote Procedure Call (remote procedure calls)

Linux: Programs that provide RPC services

Portmap

tcp/111

udp/111

Data Interchange format between RPC:

Binary/Text

NFS: Developed by Sun

NFSV1------for use inside sun

NFSv2, NFSv3 (mainstream in rhel5.x series)

NFSV3 supports both UDP and TCP

NFSV4------Mainstream in rhel6.x series

NFSv2 and NFSv3 are stateless.

(incompatible with each version of NFS)

NFS server-side components: nfs-utils

NFS Boot:

tcp/111, udp/111------portmap start------NFS Boot

NFS Process:

NFSD------Master Service (monitor tcp/2049 and udp/2049)

MOUNTD----Accept Client mount requests (Port randomization)

Quotad----Limit Local disk quotas (port randomization)

NFS configuration file

Vim/etc/exports

/path/dir x.x.x.x/xx (permissions, attributes)

Note: Multiple clients are separated by white space characters, and each client must be followed by a parenthesis that defines the client's access attributes (such as access permissions, etc.)

such as:

/var/shaw 172.24.10.0/24 (Rw,async) 192.168.10.0/24 (Ro,sync)

Showmount-e Nfs_server Viewing the nfs_server exported file system

Showmount-a nfs_server Viewing the list of clients for mounted file systems

showmount-d nfs_server Displays the list of file systems that are mounted by the client in all exported file systems on the NFS server

Client Mount:

Mount-t NFS Nfs_server:/path/dir/path/dir

Exportfs

-A general and-R or-u use simultaneously: means to mount all file systems again or to cancel exporting all

-R Re-export

-U Cancel Export

-V Show More information

File System Export Properties:

RO Read Only

RW Read/write

Sync Synchronization

Async Async

Root_squash to map the root user to a Guest account

No_root_squash

All_squash Mapping All users to Guest accounts

Anonuid,anongid Specifies the UID and GID of the mapped guest account

such as;

Vim/etc/exports

/var/shared 172.24.10.0/24 (ro,all_squash,anonuid=510,anongid=510)

Boot Automatically mounts NFS:

Vim/etc/fstab

172.24.10.21:/var/shared/mnt/nfsNFSdefaults,_rnetdev 0 0


This article is from the "Ops Sky-opsky" blog, make sure to keep this source http://opsky.blog.51cto.com/9265055/1546393

Build Linux NFS Server for the enterprise on the road

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.