Mounting a directory using nfs version4


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Mounting a directory using nfs version4
# 1  
Old 09-06-2009
Mounting a directory using nfs version4

Hi,

I would like to know how can we mount a directory using nfs v4 ?

When I use the below command, I am not sure what nfs version am using to mount the directory.

mount -t <server_name>:<shared_directory> <shared_directory>.

eg:
mount -t 10.50.0.8:/home/arun/mount/share_dir /home/arun/mount/share_dir

If the above command uses anyother nfs version, then can anyone tell me the command to mount a directory using nfs4. OS is RHEL5

Thanks in advance.
# 2  
Old 09-06-2009
Hi,

Is this what you are looking for?
Code:
mount -t nfs4 <server_name>:<shared_directory> <shared_directory>

# 3  
Old 09-10-2009
Hi,

I tried ur command. Unfortunately, it failed with the below error message:

mount.nfs4: Operation not permitted

Do you have any other suggestions ?

Thanks.
# 4  
Old 09-10-2009
It is not as simple as specifying the type in an option to the mount command. NFSv4 only uses TCP and also uses a pseudo-filesystem. Configuration is radically different than previous versions of NFS.

First check to see if you are NFSv4 enabled. Using rpcinfo, you should see a line like the following. If you do not, you are not running NFSv4. You also need to ensure that port is open in your firewall for TCP.
Code:
rpcinfo -p
....
XXXXXXX    4   tcp   2049  nfs
....

You need to ensure the ID to name mapping daemon (idmapd) is running on the server and is configured correctly (idmapd..conf) You also need to do this for you client system.

You also need to ensure that the exports done through one main export point (the pseudofile-system), with all other exports grouped underneath the main export.

Once this is all done, you show check the setup using showmount -e <servername>
If your master mount is /NFS4, you should see something like
Code:
/NFS4                    XXX.XXX.XXX.XXX
/NFS4/shared_directory   XXX.XXX.XXX.XXX

You then mount the main export, not shared_directory.

Do a Internet seach for "RHEL NFSv4 howto" or "Centos NFSv4" and you will find lots of information.
# 5  
Old 09-10-2009
Hi Murphy, Thanks for the help.

The server is NFSv4 enabled and the firewall is disabled. However, I could not get what you meant by this (am relatively newbie)

>>>>>
You need to ensure the ID to name mapping daemon (idmapd) is running on the server and is configured correctly (idmapd..conf) You also need to do this
>>>>>

Googling some NFSv4 How to pages, I did the below (and it did not throw me any error). Not sure what I did was correct.

On NFS ServerSmilieexample directories have been quoted below)

Code:
1. Edited /etc/exports by adding "/home/aruns/test 10.50.0.52 (rw,fsid=0,sync)"
2. Did "exportfs -r"

On Client side:

Code:
1. mount -t nfs4 10.50.0.52:/ /home/aruns/test

It got mounted successfully. But am half minded whether this is the correct process.

Would u like to help ??

Thanks.
# 6  
Old 09-11-2009
Quote:
Would u like to help ??
Read the following: NFSv4 setup for Fedora/Redhat/Centos
# 7  
Old 09-12-2009
Thanks a lot Murphy.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Mounting NFS

Hi, I am having some issues mounting NFS files. for some reason the mount -F nfs is not being recognized.. bash-3.2# mount -F nfs -o rw 192.168.245.129:/mnt/nfs1/ /mnt UX:vxfs mount: ERROR: V-3-20135: FSType nfs not recognized UX:vxfs mount: INFO: V-3-20147: Usage: mount {special |... (5 Replies)
Discussion started by: br1an
5 Replies

2. Red Hat

NFS mounting issue

The server ip is 10.2.2.24. I have installed nfs-utils package the i have edited /etc/exports i have added the following line /home 10.2.2.0/24(rw,sync,no_root_squash,no_all_squash) i have saved, i have started the nfs service, then i am trying to mount nfs sharing from client machine using... (5 Replies)
Discussion started by: ainstin
5 Replies

3. Red Hat

NFS mounting from client pc

The server ip is 10.2.2.24. I have installed nfs-utils package the i have edited /etc/exports i have added the following line /home 10.2.2.0/24(rw,sync,no_root_squash,no_all_squash) i have saved, i have started the nfs service, then i am trying to mount nfs sharing from client machine using... (1 Reply)
Discussion started by: ainstin
1 Replies

4. Red Hat

NFS not mounting using ipaddress of client

Dear All, I have an NFS Server and client. I am trying to include the ipaddress of the client in servers exports file /etc/exports. In this case , I could not mount , saying permission denied. But when I give * symbol in the place of ipaddress ( Global , any IPS ) it is mounting. ... (1 Reply)
Discussion started by: jegaraman
1 Replies

5. UNIX for Dummies Questions & Answers

Mounting NFS filesystem

Hi All, I need to mount an nfs filesystem as below. xxx.xx.xx.xxx:/media/nss/Rocky Catherine/logs For the above as there is space in between the name, hoping it will not mount, if i give it with double quotes as below will it work? mount "xxx.xx.xx.xxx:/media/nss/Rocky... (2 Replies)
Discussion started by: Rockyc3400
2 Replies

6. HP-UX

Mounting of unix NFS to windows XP

is it possible? i will only config on the windows side. is there a third party software to help me accomplish this? tnx (3 Replies)
Discussion started by: Amaru
3 Replies

7. Solaris

problem NFS mounting onto Solaris 10

On my Solaris 10 server, I want to share out the directory /export/home/data, so in the /etc/dfs/dfstab file, I have this line: share -F nfs -o rw /export/home/data In the /etc/hosts.equiv file, I have this: + When I do a "ps -ef" command, I see that the "nfsd' daemon is started. ... (2 Replies)
Discussion started by: serendipity1276
2 Replies

8. Linux

NFS not mounting during kickstart

Hi, Re-building linux server from a kickstart image on cdrom. We have a kickstart server. the cdrom contacins the kickstart ks.cfg file and does a NFS mount from an IP to load the iso images and other files needed during the kickstart (re-build) Now for some reason the kickstart stops and... (2 Replies)
Discussion started by: Andrek
2 Replies

9. IP Networking

Write permisson in NFS mounting

Hi all i have done set up for nfs. at server <dir> <client IP>/<netmask>(rw,sync) at client mount -o rw -nfs <server IP>:<dir1><dir2> with this i am successful in mounting the directory with write permission. But the write permission is not activate in client machine for the file which... (5 Replies)
Discussion started by: bhakti
5 Replies

10. OS X (Apple)

Mounting an NFS drive in OSX 10.3

Hi all ! I am looking for a command in the terminal or GUI to mount an NFS drive. Second , is there any solution to get rid of / " * in old files names I know it can be done i just dont know how ! Hope that some one can help Best R. Yovel (2 Replies)
Discussion started by: yoveln
2 Replies
Login or Register to Ask a Question