How To Export and Mount The Nfs Filesystem in Aix
How To Export and Mount The Nfs Filesystem in Aix
1. Ground work:
We need the below information in hand and confirm the required deamon status.
Exported directory
# lslpp –L | grep bos.net* --> Check the nfs server and client installed.
# lssrc -g nfs --> check the nfs group deamon in active state
# lslpp –L | grep bos.net* --> Check the nfs server and client installed
# lssrc -s nfsd --> check the nfs group deamon in active state
Using Smitty:
# cat /etc/exports --> To confirm the exported directory are present on the /etc/exports.
# vi /etc/exports --> To Create an entry for each directory to be exported, using the full path name of the
directory.
# exportfs -a --> To read the /etc/exports file and exports all the directories listed.
# showmount -a --> To confirm the nfs client name and directory list.
Using Smitty:
# showmount -e <server_name> --> To verify the NFS server has exported the directory.
# mkdir /local_directory --> To create the mounting directory if not already exist.
#df -gt <NFS mount_name> --> To confirm the nfs filesystem has been mounted
# showmount -e <server_name> --> To verify the NFS server has exported the directory.
# mkdir /local_directory --> To create the mounting directory if not already exist.
# mount ServerName:/remote/directory /local/directory
#df -gt <NFS mount_name> --> To confirm the nfs filesystem has been mounted
4. Roll back
Using Smitty:
# cat /etc/exports --> To check the directory now is removed and unexported.
#exportfs -u <directory_name --> where dirname is the full path name of the directory you just deleted from
#smitty rmnfsmnt
# cat /etc/filesystems --> To confirm the entry has been deleted properly.
# vi /etc/filesystems --> Find the entry for the directory you just unmounted, and then delete it.
# cat /etc/filesystems --> To confirm the entry for the directory you just unmounted properly.