NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in mounting NFS share on compactRio-9068

Solved!
Go to solution

Hi,

I am trying to mount a nfs share on compactRio-9068 with "mount -t nfs" command but it fails with message: "Connection refused" . Details about the nfs server are as follows:

Linux host "eeiash" running nfs server is running with 64-bit CentOS Linux (Ip Addr: 192.146.3.20).  nfs exports on this server are:

[root@eeiash]# cat /etc/exports

/tmp localhost(rw,sync) 192.146.3.0/24(rw,sync,no_root_squash) 10.35.13.0/24(rw,sync,no_root_squash) *(ro,sync)

I could see that /tmp share is exported from server side

[root@eeiash]# showmount -e

Export list for eeiash:

/tmp                 (everyone)

rpcInfo on server host is as follows. Everything sems okay on server side.

[root@eeiash]# rpcinfo -p

   program vers proto   port

    100000    2   tcp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp    905  status

    100024    1   tcp    908  status

    100011    1   udp   1000  rquotad

    100011    2   udp   1000  rquotad

    100011    1   tcp   1003  rquotad

    100011    2   tcp   1003  rquotad

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp  33001  nlockmgr

    100021    3   udp  33001  nlockmgr

    100021    4   udp  33001  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

    100021    1   tcp  44065  nlockmgr

    100021    3   tcp  44065  nlockmgr

    100021    4   tcp  44065  nlockmgr

    100005    1   udp   1015  mountd

    100005    1   tcp   1018  mountd

    100005    2   udp   1015  mountd

    100005    2   tcp   1018  mountd

    100005    3   udp   1015  mountd

    100005    3   tcp   1018  mountd

When tried to mount /tmp share on compactRio-9068 (Ip Addr: 192.146.3.60)

admin@compactRio-9068:# mount -t nfs 192.146.3.20:/tmp /mnt/iasHome

mount: mounting 192.146.3.20:/tmp on /mnt/iasHome failed: Connection refused

I also tried "-v" option with mount command but seems like busybox "mount" on compactRio does not recongnize "-v" option does not provide any details information about failure.

Later, I checked /var/log/messages on server side (on eeiash)

Jul  2 15:31:12 nas mountd[22463]: authenticated mount request from 192.146.3.60:846 for /tmp (/tmp)It appears

It appears that server has authinticated the request from compactRio client but somehow compactRio fails to establish connection with nfs share and display the error message. I also tried to mount this share on another linux based host which worked fine. Not sure if compactRio needs any additional settings/packages.

Has somebody come across similar issue in past? How do I debug it?

Thanks,

WillsG

  


0 Kudos
Message 1 of 14
(10,008 Views)

WillsG,

What login are you logged in as?  Are you trying to do this from an SSH prompt, or via the System Exec.vi?  Can you supply the exact command you are using?

Thanks,

-TD

0 Kudos
Message 2 of 14
(7,388 Views)

WillsG, welcome!

Can you check to see if there are some NFS utilities that are available that are not currently installed on the target through opkg? Uncomment the feed addresses in /etc/opkg/angstrom-*-feed.conf files (and change the URL to point away from us.feeds.angstrom-distribution.org as that mirror went down, point it to just feeds.angstrom-distribution.org. Sorry if it's not exact, working from memory here), then run the following

opkg update

opkg list | grep -i nfs

0 Kudos
Message 3 of 14
(7,388 Views)

Hi TD,

I am logged in to compactRio as admin (root user with uid=0). I am performing this mount operation from ssh prompt. Here is a list of commands I used:

1. ssh to compactRio (192.146.3.60) as admin  from other linux host

2. Commands used on ssh shell of compactRio:

     # cd /mnt

     # mkdir iasHome

     # mount -t nfs 192.146.3.20:/tmp  /mnt/iasHome

(this commands shows error message: mount: mounting 192.146.3.20:/tmp on /mnt/iasHome failed: Connection refused)

Hi BradM,

I will check about the nfs packages and update on this thread soon.

Thanks,

WillsG

0 Kudos
Message 4 of 14
(7,388 Views)

Hi BradM,

I did update the list of packages from opkg repo feed (src/gz angstrom-base http://feeds.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a/base/).

With "# opkg list | grep -i nfs", I don't see any nfs utilities on updated list. I also tried "opkg list-installed | grep -i nfs" but it returned blank as well.

--WillsG

0 Kudos
Message 5 of 14
(7,388 Views)

WillsG,

Thanks, figured there may be some tools that are needed but not installed (as is the case with CIFS/SAMBA). You may want to try installing util-linux-mount to see if the more-fully-featured version of mount works for you. Another thing to check would be to install a tool like tcpdump (on either the 9068 or the server) or wireshark (on the server) to compare and contrast the two mountings: the working mount from another linux machine and the not-so-work-y mount from the 9068.

0 Kudos
Message 6 of 14
(7,388 Views)
Solution
Accepted by topic author WillsG

BradM,

I did install available "util-linux-ng-mount" but did not help. I had to upgrade "libc6" to get rid of "unsatisfied dependency" for this package. Late, I removed "util-linux-ng-mount" which reverted "mount" link back to busybox.

Do you think there will be some issue for compactRio normal operation due upgraded libc6? Is there a way to downgrade it to previous version ?

Later, I came across following links to get the fix:

http://www.ridgesolutions.ie/index.php/2013/03/27/xilinx-zynq-linux-mount-nfs-volume-connection-refu...

http://forums.xilinx.com/t5/Embedded-Linux/nfs-mount-problem-on-microblaze/td-p/153272

Following mount command worked fine and I was able to get the nfs share mounted on compactRio:

# mount -o port=2049,nolock,proto=tcp  -t nfs 192.146.3.20:/tmp/ /mnt/iasHome

Thank you or all help.


0 Kudos
Message 7 of 14
(7,388 Views)

If you test and find no issues, it is reasonably likely that there will be no issues keeping the updated libc6 on the target. Note however that this library did not get nearly the same level of testing on the 9068 as the older 2.11 libc6 did, so it is advisable that you format and reinstall if it is not too inconvenient to do so.

0 Kudos
Message 8 of 14
(7,388 Views)

After getting nfs share mounted through manual shell command, I am trying to mount this nfs share during boot-up time. In order to make that happen, I added following line at the end of the file: "/etc/fstab"

192.146.3.20:/tmp  /mnt/iasHome  nfs  port=2049,nolock,proto=tcp  0 0

I verified the accuracy of line by issuing a mount command : "mount /mnt/iasHome"  which worked fine.

However, this mount operation does not work during system start-up. One logical explaination could be that network is not up by the time system tries to mount this share. Is there a way to fix this?

0 Kudos
Message 9 of 14
(7,388 Views)

In the options, you need something to tell the system that it should automatically mount the network share.

X.X.X.X:/tmp /mnt/iasHome nfs auto,port=2049,nolock,proto=tcp 0 0

The other entries in the file are either manually mounted by startup scripts or are already mounted by being the rootfs (as configured) of the system.

0 Kudos
Message 10 of 14
(7,388 Views)