Not able to mount NFS share on client side

When i tried to mount the nfs i see this error message

mount -t nfs 192.168.20.194:/remote/proj1 /nfsmount
mount: 192.168.20.194:/remote/proj1 failed, reason given by server: Permission denied

and the /etc/exports file in the host side looks like this

/remote/proj1  192.168.20.194(rw,no_root_squash,sync)

not able to figure out what exactly need to be modified

It's clear from the /etc/exports entry. Is your server's IP 192.168.20.194?

/remote/proj1  192.168.20.194(rw,no_root_squash,sync)

With the above entry, you are allowing only the server to mount the nfs share. You have to put IP of the client there instead of the server's. :wink:

thats not the client's IP it is the IP address of the Host server.

Yes, I know that. You need to change that to the client's IP and your problem is solved. That field for any host's IP or hostname or a range of IPs of hosts which are allowed to mount the share. So change it to client's IP. for more info about exports file see "man exports". :b:

Looks like your host-side (your server) exports a nfs share and allows the host-side (your server) to mount it.
Did you try to mount this share on the server? Probably you just need to run your command with root user or sudo?
Also check directory permissions!

---------- Post updated at 01:51 ---------- Previous update was at 01:48 ----------

The one line you posted (/etc/exports) may not be sufficient enough!
You may need to adjust the directory access permissions on server (/remote/proj1) as well as on the client side (/nfsmount).

Clear Understanding...
Server-A :
/remote/proj1 Server-B(rw,no_root_squash,sync)

Server-B:
mount -t nfs Server-A:/remote/proj1 /nfsmount

--Shirish

Hi,

I was trying to connect to a HP server through iLO but for some reason I was unable to connect. When I ping it I do get a reply but the connection is not being established..Please help me understand what the problem is.

---------- Post updated at 02:19 AM ---------- Previous update was at 01:53 AM ----------

HI,
Another issue is I was trying to configure NFS on the servers. I'm using 2 HP servers with RHEL. i updated the /etc/exports directory with /sharing ipaddress/netmask(rw,sync,root_squash).

mounted it on the client server but I'm getting the following error:
mount: mount to NFS server 'ipaddress' failed: System Error: No route to host.

Please help me out.

Check is there any local iptable if any am not sure or IF your server are under Firewalled .. n/w admin ...

--Shirish

changed the ip address in the host server as

/remote/proj1  *:255.255.255.0(rw,no_root_squash,sync)

but the same reason for not being mounted.
Client side:

[root@localhost /]# mount -t nfs 192.168.20.194:/remote/proj1 /nfs             
mount: 192.168.20.194:/remote/proj1 failed, reason given by server: Permission denied

Pls try the below entry in /etc/export

/remote/proj1 *(rw, sync)

Hope help !!

In mean time pls check your /etc/hosts.allow and /etc/hosts.deny entries .. also ..ur service status portmap/nfs ...

--Shirish

Another weird reason given by the client

mkdir /nfssharepoint
[root@localhost /]# mount -t nfs 192.168.20.194:/home/tom/share /nfssharepoint
mount.nfs: mount point /nfssharepoint is not a directory
[root@localhost /]#

You are doing it all wrong from the beginning!

The proper syntax to export a directory for a specific network or specific group of hosts is like this:

/remote/proj1  192.168.20.0/24(rw,no_root_squash,sync)

Note that if /remote/proj1 itself is a nfs mounted directory, it cannot be shared once again.

LOL, yeah man! :b::slight_smile: Full Ack!! :wall:

srinathk, what do you actually want to do?

Usually there's a server and there's a client, all right?

Do you want to mount a nfs share from server on the client mount point /nfsshare ?

Those two hosts have different IP addresses?

All the stuff you want to do most likely call for root rights!!

-----
Another weird reason given by the client
mkdir /nfssharepoint
[root@localhost /]# mount -t nfs 192.168.20.194:/home/tom/share /nfssharepoint
mount.nfs: mount point /nfssharepoint is not a directory
[root@localhost /]#
---

Classic! :cool:

Run

ls -l /nfssharepoint

Probably there exist a file or link with the same name!

Delete it and run

cd / && mkdir /nfssharepoint

Better mount it on a different mount point. Run

ls -l /mnt

and check if there are any free mount points :b: