Linux Systems build NFS and share to Aix

Source: Internet
Author: User
Tags nfsd

First, the Introduction of NFS

NFS is the abbreviation for network filesystem, which is the networked file system. A contract for the decentralized file system, developed by Sun, was announced in 1984. The function is to enable different machines, different operating systems to share individual data with each other, so that the application can access the data on the server disk through the network , and it is a way to implement disk file sharing among Unix-like systems.

The basic principle of NFS is to "allow different clients and services to share the same file system through a set of RPC", which is independent of the operating system, allowing different hardware and operating systems to share files together.

NFS relies on the RPC protocol during file transfer or information transfer. RPC, remote procedure calls (Remoteprocedure call) is a mechanism that enables clients to execute programs in other systems. NFS itself does not provide the protocol and functionality for transmitting information, but NFS allows us to share information over the network, because NFS uses some other transport protocols. And these transport protocols are used for this RPC function. It can be said that NFS itself is a program that uses RPC. Or, NFS is also an RPC SERVER. So whenever you use NFS, you start the RPC service, whether it's NFS server or NFS CLIENT. This allows the server and client to implement the program port correspondence via RPC. You can understand the relationship between RPC and NFS: NFS is a file system, and RPC is responsible for the transfer of information.

Second, the NFS process

NFSD: It is the basic NFS daemon, the main function is to manage whether the client can log on to the server;

MOUNTD: It is the RPC installation daemon, and the primary function is to manage the NFS file system. After the client has successfully logged on to the NFS server through NFSD, it must also authenticate with the file usage permissions before using the files provided by the NFS service. It reads the NFS configuration file/etc/exports to compare client permissions.

Portmap/rpcbind: The main function is to do port mapping work. When a client attempts to connect and use a service provided by the RPC server, such as an NFS service, PORTMAP provides the managed port to the client, which enables the client to request services from the server through that port.

Third, install NFS

rpm–qa| grep NFS

rpm-qa| grep rpcbind

In CentOS, the original Portmap changed to Rpcbind. If the two software is not installed, download the corresponding RPM package for installation (you can also use Yum and other installation methods)

Four, start NFS1. View Port Configuration

By default, NFS communicates via 2049 port, Portmap or rpcbind through 111 ports.

cat/etc/services | grep NFS

NFS 2049/tcp nfsd Shilp # Network File System

NFS 2049/udp nfsd Shilp # Network File System

NFS 2049/SCTP nfsd Shilp # Network File System

cat/etc/services | grep rpcbind

Sunrpc 111/tcp portmapper rpcbind #RPC 4.0 portmapper TCP

Sunrpc 111/udp portmapper rpcbind # RPC 4.0 portmapper

Also, the port to pin the Mount service to is 976

Cat>>/etc/services

Mountd 976/UDP

Mountd 976/tcp

Servicenfs restart

2. Discharge Network and Firewall

The IP of the source machine and target machine and the above port are put through. Turn off the firewall's masking of these ports.

3. Configure Export

Vim/etc/exports

/home/bapogg 10.249.13.0/24 (Rw,no_root_squash,async)

4. Start NFS

Servicenfs start

Servicerpcbind start

Servicenfs status

RPC.SVCGSSD isstopped

Rpc.mountd (pid8451) is running ...

NFSD (PID 84488447 8446 8445 8444 8443 8442 8441) is running ...

Rpc.rquotad (pid8435) is running ...

Servicerpcbind status

Rpcbind (PID 1541) is running ...

V. Viewing transmission performance over NFS 1. Manual Way

By copying a large file, see how long it will take to finish copying. Size/time = rate.

Six, Mount NFS1. Mount on the AIX client

Stopsrc-g NFS

0513-044 the Biodsubsystem is requested to stop.

0513-044 the Nfsdsubsystem is requested to stop.

0513-044 THERPC.LOCKD Subsystem is requested to stop.

0513-044 THERPC.STATD Subsystem is requested to stop.

Stopsrc-s Portmap

0513-044 Theportmap Subsystem is requested to stop.

Startsrc-s Portmap

0513-059 Theportmap Subsystem has been started. Subsystem PID is 156104.

Startsrc-g NFS

0513-059 The Biodsubsystem has been started. Subsystem PID is 397708.

0513-059 The Nfsdsubsystem has been started. Subsystem PID is 352796.

0513-059 Therpc.mountd Subsystem has been started. Subsystem PID is 360828.

0513-059 thenfsrgyd Subsystem has been started. Subsystem PID is 369402.

0513-059 The Gssdsubsystem has been started. Subsystem PID is 360830.

0513-059 THERPC.LOCKD Subsystem has been started. Subsystem PID is 369404.

Mount 10.249.60.65:/home/bapogg/ogg/test_nfs

Mount on a Linux client

Also want to do some of the client's necessary settings, skip over here.

Mount-t NFS 10.249.60.65:/home/bapogg/ogg/test_nfs

Seven, uninstall 1. Uninstalling on the AIX client

Unmount/ogg/test_nfs

If you report this type of error: umount:1831-01516 error while unmounting 10.249.60.65:/home/bapogg-the requested resource isbusy.

Use Fuser-k/ogg/test_nfs to kill the occupied process. Of course the less brutal way is fuser/ogg/test_nfs see which processes occupy this filesystem.

Viii. Expansion of Reading

http://www.ibm.com/developerworks/cn/aix/library/au-aix7networkoptimize2/


This article is from the "small White love life" blog, please be sure to keep this source http://sf1314.blog.51cto.com/13295031/1971745

Linux Systems build NFS and share to Aix

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.