NFS4 mount

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat NFS4 mount
# 1  
Old 03-06-2012
NFS4 mount

Hi all,

I am trying to configure an NFS4 server and client.

I have been through the entire setup and i have managed to mount the directory as i wanted to however it doesn't seem quite right.

My server is "swstage", the NFS4 pseudofilesystem is "/NFS4", the directory i am trying to export is "/soashare" size is 70GB (which i have bound within "/etc/fstab" to "/NFS4/soashare").

the client i am trying to mount that filesystem on is "soaserver", the directory i am trying to mount on is "/soa/share"

on nfs server settings are as follows:
/etc/exports (ip settings have been omitted but are correct.
Code:
/NFS4 ip.address(rw,fsid=0,sync,no_root_squash,no_wdelay)
/NFS4/soashare ip.address(rw,sync,no_root_squash,no_wdelay)

the setup of the /etc/fstab NFS4 bindings:
Code:
/soashare               /NFS4/soashare          none    bind            0 0

output of rpcinfo command:
Code:
rpcinfo -p | grep nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs

so it is nfs4 enabled, and it has the exports setup correctly, i think, please correct me if im wrong.

on the client settings are as follows
available mount points are (ip settings omitted but are correct):
Code:
showmount -e swstage
Export list for swstage:
/NFS4          ip.addresses
/NFS4/soashare ip.addresses

So we can see the directory is mountable as an NFS4 mount point.

/etc/fstab line, this is what im not entirely sure about being correct but i followed some very good instructions which worked for everything else so far so not sure why it wouldn't be right but this is what i have:
Code:
swstage:/    /soa/share          nfs4    defaults        0 0

and finally when i run the command
Code:
mount /soa/share

This works and it mounts the filesystem but it doesn't look right. first of all this /soashare directory on the NFS server is 70GB but the mounted directory is only showing as 2GB (which is the size of the / directory on the swstage server)
Code:
df -h
Filesystem            Size  Used Avail Use% Mounted on
swstage:/  2.0G  513M  1.4G  28% /soa/share

if i do an ls of /soa/share:
Code:
[root@soaserver share]# pwd
/soa/share
[root@soaserver share]# ls
soashare
[root@soaserver share]#

it shows i have mounted the pseudo filesystem, but if i change the entry in /etc/fstab to either of the following, i get exactly the same result as i described above:
Code:
swstage:/soashare    /soa/share          nfs4    defaults        0 0
swstage:/NFS4/soashare    /soa/share          nfs4    defaults        0 0

Can anyone tell me if i have done something wrong in all this or is there something i have missed out? Or even if this is correct and this is exactly what i am supposed to be seeing?

Cheers,
Tom
# 2  
Old 03-06-2012
Does not look right.

I have not worked RH for several years, so I am more than rusty. However. You definitely should be able to see all of the files and df should show disk usage correctly.
Someone with better knowledge than mine will help.

How is the file system mounted on the server that owns the file system?
# 3  
Old 03-06-2012
the actual filesystem on the NFS server is mounted on an LVM logical volume as follows.
Code:
/dev/mapper/vg03-soashare
                       69G  180M   66G   1% /soashare

# 4  
Old 03-06-2012
Quote:
My server is "swstage", the NFS4 pseudofilesystem is "/NFS4", the directory i am trying to export is "/soashare" size is 70GB (which i have bound within "/etc/fstab" to "/NFS4/soashare").
This does not make sense. Why are you exporting both /NFS4 and /NFS4/soashare if all that you want do, as you state in your post, is to export /soashare? Why not just export /soashare? Why complicate things?

On the client, you appear to be trying to mount swstage's root file system, not the server's /soashare filesystem.
Code:
swstage:/    /soa/share          nfs4    defaults        0 0

# 5  
Old 03-06-2012
Just another note which i guess makes sense but still seems a bit weird.

When i mount another client using the same settings, i can see the directory called "test" that i created on the first client, but i still cannot see it on the NFS server itself.

So it must be mounted and writing to the NFS server even though i can't see that file on the NFS server, and its not returning the correct filesystem sizing information within a df command.

one more question. do i only need the fsid=0 in the pseudo filesystem export settings or do i need fsid=0 in every filesystem that is exported in the "/etc/exports" file

---------- Post updated at 13:49 ---------- Previous update was at 13:40 ----------

fpmurphy,

My DBA colleague has asked me to setup the NFS share using NFS version 4, the setup of NFS version 4 requires a pseudo filesystem master filesystem. I was following the documentation i found in another post given on this website, here.

This is also a test as we are planning to have a whole host of filesystems being exported from this server using NFS version 4 so i need to get the specifics right first in a smaller environment before being rolled out to multiple servers and systems.

Again, the mounting of swstage:/ under version 4 works differently as this is not the root filesystem it is the pseudo filesystem that it mounts, again all explained in the documentation i was following.

I do appreciate your help with this matter.
Tom
# 6  
Old 03-06-2012
Try the information listed here.

Setting up NFSv4

This should help. Make sure that portmapper is working, and that TCP is the method for transfer, as UDP has been deprecated for NFSv4.

Also, you may want to look into using relatime or a similar construct to prevent slow performance.
# 7  
Old 03-08-2012
Again, gone through the entire setup step by step, it was identicle to the setup i had already done but still only showing that the mounted FS is 2GB and done a test write and it is definately writing to the home directory of the server and not the filesystem i have mounted...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

How to make NFS4 mount permanent ?

Hello, I'm able to mount NFSv3 shares permanently (/etc/filesystems) via smitty nfs. />lsfs -a Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/hd4 -- / jfs2 2097152 -- yes no /dev/hd1 -- ... (5 Replies)
Discussion started by: System Admin 77
5 Replies

2. AIX

Showmount don't show NFS4

Configure nfs4 on aix ok i did all chnfsdom #return correct domain chnfs -r /export chnfs -p /export configured and shared pseudo root #etc/exports /export -nfsroot /var/pubblica -exname=/export/pubblica,vers=4,sec=sys:krb5p:krb5i:krb5:dh,rw exportfs -a mount correct mount... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies

3. Shell Programming and Scripting

Script to mount nas-share using generated credentials (mount EC 13,32)

Heyas At home i have 1 nas with 3 shares, of which i used to mount 2 of them using a script with hardcoded password and username in it. EDIT: Turns out, its not the script, but 'how i access' the nas share.. (-o user=XY,password=... VS. -o credentials=...). Figured about credential files,... (0 Replies)
Discussion started by: sea
0 Replies

4. Red Hat

NFS4 and acl: perfect on Slackware,not working on centos6,why?

I have a problem with acl and nfs4 on centos. On Slackware clients nfs4 fs mounted works fine,acl (posix,not nfs acl) is respected. On Centos 6.4 very strange thing..acl is not working on nfs4. nfsmount.conf and idmapd.conf are the same on all client and kernel options on nfs acl are the... (1 Reply)
Discussion started by: Linusolaradm1
1 Replies

5. Red Hat

NFS4 Mount issue - ASAP

Hi, I am trying to mount via nfs4 # mount -t nfs4 10.1.56.16:/Apps /works/apps/xyz Error: Warning rpc.idmapd apperas not to be running all uids will be mapped to the nobody uid mount to NFS server "10.1.56.16' failed RPC error: program/version mismatched pls help - this is coming... (1 Reply)
Discussion started by: saurabh84g
1 Replies

6. Red Hat

NFS4 Ldap Automount issue

OK, I'm running low on patience with how this is working out. I have a RHEL 5.4 64bit server running 389 directory services and NFS4. I set up the schema for automount, and I am having some issues. I'm relatively new to both LDAP and Automount, and NFS4 has thrown me some curves vs NFS2/3.... (6 Replies)
Discussion started by: mark54g
6 Replies

7. UNIX for Advanced & Expert Users

NFS4 locking file question

All, Just wondering if someone has a file open on client A for writing and it is locked, is that file still readable from client A or B? Basically I'm just wanting to know if a file is opened already, can it still be opened for read only? (1 Reply)
Discussion started by: markdjones82
1 Replies

8. UNIX for Advanced & Expert Users

mount -t cifs permission denied by mount -t smbfs works fine

I am having trouble mounting with cifs, but mounting the exact same command with smbfs works fine. The share is on another samba server and is set to full public guest access. # mount -t cifs //servername/sharename /mnt/temp -o password="" mount error 13 = Permission denied Refer to the... (3 Replies)
Discussion started by: humbletech99
3 Replies

9. AIX

NFS4 with KERBEROS

I was wondering if any of you have used NFS4 with KERBEROS in a HACMP setup and environment with more than 1 resourcegroup that has NFS mount in them. I Configures the host keys for an Network File System (NFS) server I get stuck with the nfshostkey I can only add one at a time per system so... (0 Replies)
Discussion started by: ravager
0 Replies

10. UNIX for Dummies Questions & Answers

how to mount a hotswap scsi drive on a solaris 2.6 netra box using the mount command?

Hi... question is this: How do I mount an LVD hotswap scsi drive in bay #2 on a netra using the mount command? volmgt doesn't seem to mount it and/or I don't know how to view the drives data if it's formatted which it may not be. This drive is not new out of the box so I'm not sure. ... (4 Replies)
Discussion started by: soulshaker
4 Replies
Login or Register to Ask a Question