You should be familiar with AIX. Now we will focus on the NFS server, so our platform is AIX 5L. The specific process of configuring NFS Server/Client on AIX 5L is described in detail.
1. Configure the AIX 5L NFS Server
First, you need to start the NFS Server. You can start or stop the nfs service group through smit NFS-> Network File System (NFS)-> Configure nfs on This System.
You can view the nfs service status through lssrc-g nfs.
- #lssrc -g nfs
-
- Subsystem Group PID Status
- biod nfs 712706 active
- nfsd nfs 635260 active
- rpc.mountd nfs 462932 active
- rpc.lockd nfs 639418 active
- rpc.statd nfs 757914 active
- nfsrgyd nfs inoperative
- gssd nfs inoperative
Of course, you can also start and stop the service group subsystem through startsrc-g nfs and stopsrc-g nfs. Whenever the system starts,/etc/rc. nfs runs the exportfs command to read the/etc/exports file on the server, and then tells the kernel which directories to export and the corresponding permissions. Then the rpc. mountd and above daemon are started by/etc/rc. nfs.
/Etc/exports specifies the Directory and permissions to be exported by the AIX 5L nfs server. The file content is as follows, as shown in
- #more /etc/exports
- /u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name
Note: you must write the machine name for access. The ip address corresponding to the machine name is displayed in/etc/hosts.
You can use exportfs to export the directory, for example:
- #/usr/sbin/exportfs -a
- #/usr/sbin/exportfs
- /u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name
For more usage of exportfs, see related help. In addition, the format of/etc/xtab is the same as that of/ext/exports. When running exportfs, /etc/xtab will be updated to temporarily export a directory without updating the exports file.
For updates to/etc/exports, you can also use smit nfs-> Network File System (NFS) -> Add a Directory to Exports List or Change/Show Attributes of an Exported Directory, as shown in
- #smit chnfsexp
-
- * Pathname of directory to export /u01/logs
- Anonymous UID [-2]
- Public filesystem? [no]
- * Change export now, system restart or both both
- Pathname of alternate exports file []
- Allow access by NFS versions []
- External name of directory (NFS V4 access only) []
- Referral locations (NFS V4 access only) []
- Replica locations []
- Ensure primary hostname in replica list yes
- Allow delegations? []
- Security method [sys,krb5p,krb5i,krb5,dh,none]
- Mode to export directory [read-write]
- Hostname list. If exported read-mostly []
- Hosts & netgroups allowed client access [host_name1,host_name2]
- Hosts allowed root access []
Verify that the/etc/exports file on the server lists the name of the file system to be installed on the client and whether the file system has been exported. Run the following command:
- #showmount -e server_name
This command runs normally on the AIX 5L NFS Server/client and lists all file systems exported by server_name.