Monitoring, Management & Location Tracking

Accessing NFS from AMP (mounting NFS server over network) :-

Aruba Employee

The instructions below were used and tested on the /var/airwave-backup folder where nightly_backup files are kept.

Server:

1. install rpms for nfs and portmap
# yum -y install nfs-utils xorg-x11-xauth
# chkconfig --add portmap
2. start portmapper
# service portmap start
3. check to see if portmap is running
# rpcinfo -p
4. designate folder(s) to export
# vi /etc/exports
Insert the following line:
/var/airwave-backup 10.10.2.0/255.255.255.0(rw,no_root_squash,async)
5. edit hosts.allow
# vi /etc/hosts.allow
Insert the following lines:
portmap: 10.2.32.0/255.255.255.0
lockd: 10.2.32.0/255.255.255.0
rquotad: 10.2.32.0/255.255.255.0
mountd: 10.2.32.0/255.255.255.0
statd: 10.2.32.0/255.255.255.0
6. edit hosts.deny
# vi /etc/hosts.deny
Insert the following lines:
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
7. start nfs
# service nfs restart
8. configure client
9. check mount test
# ls /var/airwave-backup
if mount.test is seen, then mount is working


Client:

1. install rpms for nfs and portmap
# yum -y install nfs-utils xorg-x11-xauth
# chkconfig --add portmap
2. start portmapper
# service portmap start
3. check to see if portmap is running
# rpcinfo -p
4. create directory to mount to
# mkdir /mnt/ampbackup2
5. insert volume to mount into fstab
# echo '10.10.2.100:/var/airwave-backup /mnt/ampbackup2 nfs defaults 0 0' >> /etc/fstab
6. mount folders
# mount /mnt/ampbackup2
7. check mounts
# mount
# cd /mnt/ampbackup2
# touch mount.test
8. check mount test on server
9. to unmount, can't be in mounted folder during unmount
# root; umount /mnt/ampbackup2


These aren’t the most advanced configurations, but these steps successfully gained access to the filesystem, and made it possible to copy files back and forth. From here, you can setup a cronjob to copy and rename backups daily.


-----
If your server isn't connected to the internet:

Here are the names and versions of the packages installed on my test server:
[root@test mercury]# rpm -qa nfs-utils
nfs-utils-1.0.9-42.el5
[root@test mercury]# rpm -qa xorg-x11-xauth
xorg-x11-xauth-1.0.1-2.1

A google search for each of these packages found the following links.

For nfs-utils-1.0.9-42.el5
http://linux1.fnal.gov/linux/fermi/slf51/i386/sites/Fermi/updates/security/repodata/repoview/nfs-utils-1-1.0.9-42.el5.html

For xorg-x11-xauth-1.0.1-2.1
http://linux1.fnal.gov/linux/slf52/i386/SL/repodata/repoview/xorg-x11-xauth-1-1.0.1-2.1.html

Some quick rpm commands:
List installed rpm packages
# rpm –qa package_name
Uninstall rpm packages
# rpm –e package_name
Install rpm packages
# rpm –ivh package_name
You can do multiple packages in one command:
# rpm –ivh nfs-utils-1.0.9-42.el5.i386.rpm xorg-x11-xauth-1.0.1-2.1.i386.rpm

Download the rpm, upload to the server (suggested folder: /var/airwave/custom), then run the “rpm –ivh package_name”. This should result in success.

One other thing, in the /etc/fstab entry, you may need to insert “rw” instead of “defaults” – this setting depends on the access level needed.



Other packages that may be needed:
libXext-1.0.1-2.1
libXmu-1.0.2-5

Version history
Revision #:
1 of 1
Last update:
‎06-25-2014 03:46 PM
Updated by:
 
Labels (1)
Contributors
Comments
pgemme

This was a good start for me, but running 8.0.5 (which I believe is CentOS 6.2) I ran into differences if anyone else tries this.

portmap is replaced by rpcbind

I also kept getting the error:

  • Starting NFS daemon: rpc.nfsd: unable to bind inet UDP socket: errno 98 (Address already in use) [FAILED]

And showmount would give an RPC error:

  • clnt_create: RPC: Program not registered

 

I used netstat to check ports that UDP already had in use:

[root@servername# netstat -tunlp | grep ":32769 "

  • udp        0      0 0.0.0.0:32769               0.0.0.0:*                               1969/Daemon:

[root@servername]# ps -ef | grep 1969

  • root      1969     1 50  2014 ?        31-23:24:34 Daemon::SNMPV2Fetcher

 

I ended up having to change some of the default nfs ports in the /etc/sysconfig/nfs file:

[root@servername]# cat nfs | grep PORT

RQUOTAD_PORT=875

LOCKD_TCPPORT=32803

LOCKD_UDPPORT=32774

MOUNTD_PORT=892

STATD_PORT=662

STATD_OUTGOING_PORT=2021

#RDMA_PORT=20049

 

Then restarted nfs:

[root@servername]# service nfs restart

Shutting down NFS daemon:                                  [  OK  ]

Shutting down NFS mountd:                                  [  OK  ]

Shutting down NFS services:                                [  OK  ]

Shutting down RPC idmapd:                                  [  OK  ]

Starting NFS services:                                     [  OK  ]

Starting NFS mountd:                                       [  OK  ]

Starting NFS daemon: rpc.nfsd: unable to bind inet UDP socket: errno 98 (Address already in use)

                                                           [  OK  ]

Starting RPC idmapd:                                       [  OK  ]

 

Even though the error still showed up, idmapd started and rpcinfo looked correct:

[root@servername]# rpcinfo -p

   program vers proto   port  service

    100000    4   tcp    111  portmapper

    100000    3   tcp    111  portmapper

    100000    2   tcp    111  portmapper

    100000    4   udp    111  portmapper

    100000    3   udp    111  portmapper

    100000    2   udp    111  portmapper

    100005    3   udp    892  mountd

    100005    3   tcp    892  mountd

    100003    4   tcp   2049  nfs

    100021    1   udp  32774  nlockmgr

    100021    3   udp  32774  nlockmgr

    100021    4   udp  32774  nlockmgr

    100021    1   tcp  32803  nlockmgr

    100021    3   tcp  32803  nlockmgr

    100021    4   tcp  32803  nlockmgr

 

Showmount finally didn't error either:

[root@airwave sysconfig]# showmount -e airwave

Export list for airwave:

/var/airwave-backup 10.2.32.10

 

I was then able to mount from the client just fine.  I used chkconfig to set 35 as well.

 

 

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.