LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NFS Mount (https://www.linuxquestions.org/questions/linux-newbie-8/nfs-mount-921984/)

dorlack 01-04-2012 07:20 AM

NFS Mount
 
Hello,

I am new to linux, and am trying to figure out how to connect to NFS mount.

This is running on a windows server,

I keep getting "unrecognized mount point" makes me think I may be using the wrong command.

deep27ak 01-04-2012 07:25 AM

try this on client machine

Code:

#mount -t nfs server ip/location/to/dir    /mount/point

Cedrik 01-04-2012 07:35 AM

You could also check server nfs export list:
Code:

/usr/sbin/showmount -e <server ip or name>

dorlack 01-04-2012 08:11 AM

NFS Mount
 
Here is what I get:

[root@cs sbin]# showmount -e 10.67.36.34
Export list for 10.67.36.34:
/RF7800N_NFS (everyone)



[root@cs sbin]# mount -t nfs 10.67.36.34/location/to/dir /rfcafs24/RF7800N_NFS?
mount.nfs: mount point /rfcafs24/RF7800N_NFS? does not exist
[root@cs sbin]#

Cedrik 01-04-2012 08:13 AM

Code:

mkdir /mnt/tmp
mount -t nfs 10.67.36.34:/RF7800N_NFS /mnt/tmp
cd /mnt/tmp
ls


kenshoomy 01-04-2012 08:15 AM

try creating /rfcafs24/RF7800N_NFS? before mounting

dorlack 01-04-2012 08:30 AM

[root@cs sbin]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mnt/tmp
mount.nfs: access denied by server while mounting (null)


[root@cs sbin]# cd /mnt/tmp
bash: cd: /mnt/tmp: Permission denied

[root@cs mnt]# cd tmp
bash: cd: tmp: Permission denied



Is this the server denying?

dorlack 01-04-2012 09:41 AM

I am able to ping the 10. fine. My guess is I am on the domain if i can ping the 10. I am just trying to rule out any issues from the RHEL client end, if this is the server blocking mount.

Cedrik 01-04-2012 11:28 AM

This is strange...
Did you try to cd into the directory when loggued as simple user, just in case ?

dorlack 01-04-2012 02:54 PM

here it is as normal user:

[jweath02@cs /]$ ls
bin dev home lost+found misc net proc sbin srv tmp var
boot etc lib media mnt opt root selinux sys usr
[jweath02@cs /]$ cd mnt
[jweath02@cs mnt]$ ls
tmp
[jweath02@cs mnt]$ cd tmp
bash: cd: tmp: Permission denied
[jweath02@cs mnt]$


still getting the same regardless if Root or normal user.

Cedrik 01-04-2012 03:33 PM

What is the output with ls -al /mnt/tmp ?

Does the windows system administrators say something about how to set up unix account to work with nfs shares ?

deep27ak 01-04-2012 10:04 PM

Quote:

Originally Posted by dorlack (Post 4566107)
here it is as normal user:

[jweath02@cs /]$ ls
bin dev home lost+found misc net proc sbin srv tmp var
boot etc lib media mnt opt root selinux sys usr
[jweath02@cs /]$ cd mnt
[jweath02@cs mnt]$ ls
tmp
[jweath02@cs mnt]$ cd tmp
bash: cd: tmp: Permission denied
[jweath02@cs mnt]$


still getting the same regardless if Root or normal user.

It seems the question has been changed from NFS mounting to permission issue

first thing I don't get the concept of mounting NFS on /mnt but even if you want to continue using it, I would like to see the permissions on this directory

Code:

#ls -l / | grep mnt
#ls -l /mnt

secondly I would advice to create another folder in root directory to mount NFS
Code:

#mkdir /NFS
#mount -t nfs 10.67.36.34/location/to/dir /NFS

Quote:

Originally Posted by dorlack (Post 4566107)
[root@cs sbin]# mount -t nfs 10.67.36.34/location/to/dir /rfcafs24/RF7800N_NFS?
mount.nfs: mount point /rfcafs24/RF7800N_NFS? does not exist

I have never seen any directory name ending with question mark so I would again advice you to check the directory name correctly

On the NFS server run this command and show me the output
Code:

#exportfs -v
also make sure firewall or selinux is not blocking NFS

dorlack 01-05-2012 07:41 AM

[jweath02@cs ~]$ ls -l / | grep mnt
drwxr-xr-x. 3 root root 4096 Jan 3 21:29 mnt
[jweath02@cs ~]$ ls -l /mnt
total 1
drwx------. 2 4294967294 4294967294 64 Jan 4 08:43 tmp
[jweath02@cs ~]$

dorlack 01-05-2012 07:44 AM

[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
[root@cs /]# ls
bin dev home lost+found misc net opt root selinux sys usr
boot etc lib media mnt NFS proc sbin srv tmp var
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)


First attempt no error, second attempt gets denied.

deep27ak 01-05-2012 07:50 AM

have you configured any firewall on server?

show me the output of
Code:

#exportfs -v <---------on NFS server
on both the machine
Code:

#iptables -L
make sure portmap service is running on server
Code:

#service portmap status
did you made any changes on server once after mounting?

deep27ak 01-05-2012 07:51 AM

Quote:

Originally Posted by dorlack (Post 4566809)
[jweath02@cs ~]$ ls -l / | grep mnt
drwxr-xr-x. 3 root root 4096 Jan 3 21:29 mnt
[jweath02@cs ~]$ ls -l /mnt
total 1
drwx------. 2 4294967294 4294967294 64 Jan 4 08:43 tmp
[jweath02@cs ~]$

you were getting permission denied may be because of the permission.

I don't understand the owner of this tmp directory but you can try changing th ownership and permission and give a try to mounting

Code:

#chown root:root /mnt/tmp
#chmod 777 /mnt/tmp


dorlack 01-05-2012 08:05 AM

The NFS server us running on a Windows machine...

dorlack 01-05-2012 08:06 AM

[root@cs /]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination



IP tables on the client is posted above.

No firewall config, this is a fresh install of RHEL 6.2 WS

dorlack 01-05-2012 08:09 AM

[root@cs /]# chown root:root /mnt/tmp
chown: changing ownership of `/mnt/tmp': Permission denied
[root@cs /]# chmod 777 /mnt/tmp
chmod: changing permissions of `/mnt/tmp': Permission denied
[root@cs /]#

deep27ak 01-05-2012 08:11 AM

Never worked with NFS server on windows :(

check the firewall on windows and on your linux machine

deep27ak 01-05-2012 08:14 AM

stop the firewall and try mounting

Code:

#service iptables stop

dorlack 01-05-2012 08:19 AM

[root@cs /]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS? /NFS
mount.nfs: access denied by server while mounting (null)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)

deep27ak 01-05-2012 08:23 AM

Quote:

Originally Posted by dorlack (Post 4566847)
[root@cs /]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS? /NFS
mount.nfs: access denied by server while mounting (null)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)

you are using different names while mounting?

you said the server is on windows?
I don't think I would be able to help with windows stuff but here are some links might be helpful

http://social.technet.microsoft.com/...-f4bf40de9c8d/

http://support.microsoft.com/kb/324089

dorlack 01-05-2012 08:31 AM

I was sent /RF7800N_NFS?, I was trying it without ? just in case. My goal is to rule out the linux box and point the issue back to the Windows server.

dorlack 01-05-2012 10:00 AM

So any reason why I am unable to get to /mnt/tmp ?

**Permission denied**

This is on client end, correct.

Cedrik 01-05-2012 10:15 AM

Hey, make new account with uid = 4294967294 in linux box :p

dorlack 01-05-2012 11:28 AM

???

kbscores 01-05-2012 11:40 AM

Couple of things -

From looks of it NFS is linux mount point correct? make sure before mounting to do a chmod 777 on that directory. Ultimately filesharing permissions will be handled else where so having it open doesn't matter.

Second - if you are able to mount device than odds are there is a UID/GID issue on windows side. Even though it says device is open to everyone the mount itself is controlled by UID/GID on windows side. So if you keep getting permission denied check permissions on both folder AND verify UID 0 has permission to access device FROM WINDOWS side.

dorlack 01-05-2012 11:58 AM

This is what was given to me.

rfcafs24/RF7800N_NFS?

Server name and mount.

Perhaps I mixed something up?

dorlack 01-05-2012 12:01 PM

Also I am getting permission denied when trying to run chmod 777 on mnt/tmp and /NFS

kbscores 01-05-2012 12:41 PM

Are you mounting this as a specific user or root? It seems like you are trying to do this as a non-root user. Unless specified by root non-root users will not be able to mount specified device.

kbscores 01-05-2012 01:18 PM

Here this might help: Our Full procedure from both Windows and Linux Side

From Windows:

Network File Share “NFS” File sharing
This applies to setting up Windows 2003, Windows 2008 server to setup Unix accessible file or folder shares.

1. Install the NFS role, or on W2k3, install Windows Network file sharing service.
2. Edit the NFS Configuration:
a. In Windows 2003 this is done via the Network file sharing GUI located under administrative tools
b. In Windows 2008 this can be done under the “Share and storage Management” GUI or under “Edit Network File sharing configuration” wizard
3. Editing the NFS configuration
a. Selecting Identity Mapping Solution: Only required if you intend to setup a Active Directory Authentication, or User Name Mapping Authentication.

Note: I was unable to use the AD authentication on our network due to the requirement of a 2008 functional level Domain.

Note: I was unable to use a User Name Mapping Server, without a Win2K3 Server, the only version that supports the User Name Mapping Server service.

b. Setup Domain Authorization: This is not required at this point because our domain would not support AD authentication
c. Open firewall ports: Was not required on our network.. May be required to traverse networks.
d. Use NFS to Share Folders: This is the main part of the setup.
i. Click “Provision a Shared Folder Wizard” in the right pane.
ii. Browse to the Drive / folder you wish to share
iii. Select Next, select “yes” to change NTFS permissions
iv. Add the “Everyone” user account and provide the needed NFS permissions
Note: Everyone is not provided access to the NFS share you are creating, it only will allow the specific UID, GID account specified under the “Allow anonymous access” we will setup

Select “Next” and check the NFS share name.

Select “Next” and check “Allow anonymous access” Click “Edit” to the right of the permissions box, and set Full control.

Click “Add” and enter either the FQDN or the IP address of the Unix Host that needs to access this share. Ensure you give read write and root access rights.
Click Next and Next again to skip the Filter and Quota sections.

Go back to the Share and Storage Management console and refresh the display. The new NFS share should appear at the bottom. (in Win2k3 you will see the share listed under the NFS GUI.

Right click the share and select properties. Click the permissions TAB and select NFS permissions. Select the client unix computer / server that you entered and enter the Anonymous UID GID provided by the Unix department for that server. This is usually a 4 digit number and select Ok.

That’s it.. have them test the mount to this share from the Unix server side.

Linux:

As root create new directory to mount nfs share:
Code:

# mkdir /mymount
Change permissions on new directory
Code:

# chmod 777 /mymount
Verify mount is accessible: (Using IP is recommended, but hostnames are acceptable)
Code:

# showmount -e 111.111.111.111
Note: This should show something like
Code:

/sharedMount (everyone)
Next mount file system:
Code:

# mount -t nfs 111.111.111.111:/sharedMount /mymount
Note: If you are unable to mount at this point check window's sharing permissions
Note: If you are unable to cd to filesystem but it does mount then check window's directory permissions for specified user.



--Just as a heads up our window's team handles windows share - I asked for their procedure. Hopefully this helps ya out some.

Cedrik 01-05-2012 01:53 PM

Googlin' for uid 4294967294 brings some interesting results...

One suggests to mount nfs share as nfs v.3

Try it:

Code:

mount -t nfs -o vers=3 10.67.36.34:/RF7800N_NFS /NFS

dorlack 01-05-2012 02:27 PM

[root@cs /]# mount -t nfs -o vers=3 10.67.36.34:/RF7800N_NFS /NFS
mount.nfs: access denied by server while mounting (null)
[root@cs /]#

dorlack 01-05-2012 02:34 PM

RF7800N_NFS

[root@cs /]# mkdir /mymount
[root@cs /]# chmod 777 /mymount
[root@cs /]# showmount -e 10.67.36.34
Export list for 10.67.36.34:
/RF7800N_NFS (everyone)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mymount
[root@cs /]# ls
bin dev home lost+found misc mymount NFS proc sbin srv tmp var
boot etc lib media mnt net opt root selinux sys usr
[root@cs /]# cd mymount
bash: cd: mymount: Permission denied
[root@cs /]#

dorlack 01-05-2012 02:39 PM

I am guessing at this point it must be permissions on the windows box...

agree?

dorlack 01-05-2012 03:19 PM

/RF7800N_NFS (everyone)
[root@cs /]# mount -t nfs 10.67.36.34:/RF7800N_NFS /mymount
mount.nfs: mount system call failed


after changes to server...

any ideas?

changed for anonymous access on server end

Cedrik 01-05-2012 03:23 PM

Was uid changed ? ls -l /mymount

kbscores 01-05-2012 03:32 PM

check to see if nfsnobody user exists on Linux box - and check uid of that user - when file system is mounted.

Who is owner of file system when it is mounted and if there is a uid what is uid?

kbscores 01-05-2012 03:34 PM

just as a general note - windows does not make nfs easy - their documentation has errors all over it so I seriously feel for anyone who ever has to utilize this method.

dorlack 01-06-2012 07:00 AM

[root@cs /]# ls -l /mymount
ls: cannot open directory /mymount: Permission denied
[root@cs /]#

Cedrik 01-06-2012 07:25 AM

And with: ls -ld /mymount

kbscores 01-06-2012 07:49 AM

Just do an ls on / and see who owns directory

if it is something other than UID 0 or root try to su to that user and access directory.

Althought this is still most likely a permissions issue on windows side -

Just googled and came up with this link for permissions on Windows side - maybe this will help some -

http://support.microsoft.com/kb/324544

dorlack 01-06-2012 09:21 AM

[root@cs /]# ls -ld /mymount
drwxrwxrwx. 2 4294967294 4294967294 64 Jan 4 08:43 /mymount

dorlack 01-06-2012 09:23 AM

[4294967294@cs /]$ mount -t nfs 10.67.36.34:/RF7800N_NFS /NFS
mount: only root can do that

---------- Post added 01-06-12 at 10:24 AM ----------

[root@cs /]# ls
bin boot dev etc home lib lost+found media misc mnt mymount net NFS opt proc root sbin selinux srv sys tmp usr var
[root@cs /]#

Cedrik 01-06-2012 09:33 AM

Why is your prompt like:
Code:

4294967294@cs
You created an user with 4294967294 as user name ?

kbscores 01-06-2012 10:02 AM

That is bugged nfsnobody uid -

you won't be able to mount as nfsnobody but once root mounts it you should be able to access device as nfsnobody.

whoever has window's side set up doesn't have uid/gid set up correctly - Are you using any maps? Also translation files sometimes can cause access issues as well.

dorlack 01-06-2012 12:30 PM

[root@cs /]# service nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped

dorlack 01-06-2012 12:36 PM

at one point in this forum someone asked me to create a user 4294967294 and try to mount

Cedrik 01-06-2012 02:36 PM

No, I suggested to create an user with any name you want, but with uid=4294967294 and gid=4294967294
(uid is user identification number, gid is group identification number)

It is just for testing... You could name it nfsnobody

Do you already have a nfsnobody user set in your /etc/passwd file ?
Check with : grep nfsnobody /etc/passwd
...if it returns something


All times are GMT -5. The time now is 02:13 PM.