May 18 2009

Export NFS shares in AIX

Published by at 9:29 pm under Aix

Here are pretty simple steps required to export NFS shares in AIX.

Export NFS Shares on Server

Edit /etc/exports (or create it if it doesn’t exist) and add folders you would like to share:

/home/public -access=client1,root=client1

Option access restricts the list of clients, root allows to mount the share by root user on the remote system.
Start related services nfsd and mountd:

startsrc -s nfsd
startsrc -s mountd

Now that services have been started, check daemons are actually running:

AIX_NFS_Server $ lssrc -s nfsd
Sub-system      Group           PID     State
 nfsd           nfs             36540   active

AIX_NFS_Server $ lssrc -s portmap
Sub-system      Group           PID     State
 portmap        portmap         3890    active
AIX_NFS_Server $ lssrc -s biod

Sub-system      Group           PID     State
 biod           nfs             6454    active

You can then export all directories listed in /etc/exports at once

exportfs -a

They should be visible running “exportfs” on the command line with no option.

Mount NFS Shares on Client

Check from the client that RPC services are reachable:

Linux_NFS_Client $ rpcinfo -p $NFS_Server_IP | egrep "(mountd|nfs)"
    150001    1   udp  32773  pcnfsd
    150001    2   udp  32773  pcnfsd
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100005    1   udp  41863  mountd
    100005    2   udp  41863  mountd
    100005    3   udp  41863  mountd
    100005    1   tcp  41489  mountd
    100005    2   tcp  41489  mountd
    100005    3   tcp  41489  mountd

If you got results from the previous command, NFS shares should be visible with showmount on a Linux client for example:

Linux_NFS_Client $ showmount -e $Server_IP
Export list for $SERVER_IP:
/home/public (everyone)

You can now mount the share:

Linux_NFS_Client $ mount -t nfs $Server_IP:/home/public /mnt

2 responses so far

2 Responses to “Export NFS shares in AIX”

  1. Oscaron 02 Jul 2012 at 11:37 pm

    Very helpful thank you.

  2. fattiizmanon 20 Feb 2015 at 2:48 pm

    Very good post, concise and simple.


Comments RSS

Leave a Reply