Bug 1043435 - nfsv4 fsid
Summary: nfsv4 fsid
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Filesystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-16 10:14 UTC by M.T
Modified: 2014-04-28 17:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-28 17:11:04 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description M.T 2013-12-16 10:14:41 UTC
Description of problem:

We try to setup an nfsv4 server, on redhat enterprise linux 6.4, but we can not figure out whether fsid parameter is required, or we can setup the server with no use of virtual root directory
 
Version-Release number of selected component (if applicable):
nfs-utils-1.2.3

How reproducible:
In documentation of redhat ver 5, the usage of fsid is mentioned, but nothing is mentioned in the documentation of ver 6.X

Do we actually need the use of fsid? What are the pros and cons of using this?

Comment 1 Steve Dickson 2013-12-16 14:47:25 UTC
(In reply to M.T from comment #0)
> Description of problem:
> 
> We try to setup an nfsv4 server, on redhat enterprise linux 6.4, but we can
> not figure out whether fsid parameter is required, or we can setup the
> server with no use of virtual root directory
>  
> Version-Release number of selected component (if applicable):
> nfs-utils-1.2.3
> 
> How reproducible:
> In documentation of redhat ver 5, the usage of fsid is mentioned, but
> nothing is mentioned in the documentation of ver 6.X
> 
> Do we actually need the use of fsid? 
Generally no. They are only needed if the server can not uniquely identify
a file sytem (usually by the UUID). When this is the case, the server
log a message saying the fsid need to be set.

> What are the pros and cons of using this?
I'm not sure there are any pros or cons...

Comment 2 Steve Dickson 2013-12-16 15:00:27 UTC
(In reply to Steve Dickson from comment #1)
> > In documentation of redhat ver 5, the usage of fsid is mentioned, but
> > nothing is mentioned in the documentation of ver 6.X
The exports(5) man mentions the fsid option.

> > 
> > Do we actually need the use of fsid? 
> Generally no. They are only needed if the server can not uniquely identify
> a file sytem (usually by the UUID). When this is the case, the server
> log a message saying the fsid need to be set.
I just noticed you are talking about fsids and NFSv4. As it says in the
man page setting fsid=0 on an export will cause that export to become
the NFSv4 root. For example there is the following directory tree
on the server:

/export/home

Its exported like 
  /export *(rw,fsid=0)

Now then the client mounts the root '/'
  mount server:/ /mnt 

the client will on see the home directory 
  ls /mnt/home

Also the home directory mountable 
  mount server:/home /mnt
  ls /mnt/home/steved

but the export directory is not
  mount server/export /mnt
  mount.nfs: access denied by server while mounting localhost:/export

> 
> > What are the pros and cons of using this?
> I'm not sure there are any pros or cons...
Now I understand your question....

Setting the NFSv4 root to something other '/' allows the
server to partition off what directory trees client can see.

Only Linux server have this option and I'm not sure widespread 
it used.

Comment 4 Dave Wysochanski 2014-01-08 21:01:35 UTC
Did Steve answer your question or do you feel some change is needed such as documentation?

Comment 5 M.T 2014-01-09 09:01:36 UTC
Yes, indeed, I think that is better to clarify  it in RH 6.X  documentation and to make it clear that there is no need to set the fsid, or to mention when is needed to set it up.

Many thanks for your reply

Maria

Comment 6 M.T 2014-01-09 10:50:20 UTC
Actually to be honest, I am still not sure if I understand it correctly. Do you think, that I can ommit the fsid, and do the exports and the mounts,just like the nfsv3 setup?

Actually, that's how I have implemented on our nfsv4 server, running on RH 6.4.
I export all the directories with no fsid number, 

My /etc/exports includes the following :

/home/courses    ws1(rw,sync) ws2(rw,sync)  ws3(rw,sync)  
/home/projects   ws1(rw,sync) server1(rw,sync) server2(rw,sync)
/extraspace/faculty ws1(rw,sync) ws2(rw,insecure,sync) 
/home/students   server1(rw,sync) ws2(rw,insecure,sync) server3(rw,insecure,sync) 


Most of my nfs clients are running rh6.4/6.3 and rh5.5, and mounts the nfs server exports with nfsv4 

(running the nfsstat -m command , from nfsclient verifies it 

/home/students from csfs7:/home/students/
 Flags: rw,relatime,vers=4,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=x.x.x.x,minorversion=0,local_lock=none,addr=Y.Y.Y.Y


However, we have noticed that we have nfs performance issues, and we first suspect the configuration of nfs4.

Do you think the whole configuration is correct, or do I have to implement the fsid=0?

Comment 7 Steve Dickson 2014-01-13 14:40:33 UTC
(In reply to M.T from comment #6)
> Actually to be honest, I am still not sure if I understand it correctly. Do
> you think, that I can ommit the fsid, and do the exports and the mounts,just
> like the nfsv3 setup?
Yes. The setting of fsid, to make v4 exports work like v3 was never
needed in RHEL6. It is needed in RHEL5 although.... 

> 
> Actually, that's how I have implemented on our nfsv4 server, running on RH
> 6.4.
> I export all the directories with no fsid number, 
> 
> My /etc/exports includes the following :
> 
> /home/courses    ws1(rw,sync) ws2(rw,sync)  ws3(rw,sync)  
> /home/projects   ws1(rw,sync) server1(rw,sync) server2(rw,sync)
> /extraspace/faculty ws1(rw,sync) ws2(rw,insecure,sync) 
> /home/students   server1(rw,sync) ws2(rw,insecure,sync)
> server3(rw,insecure,sync)
Note, 'sync' is the default.

> 
> 
> Most of my nfs clients are running rh6.4/6.3 and rh5.5, and mounts the nfs
> server exports with nfsv4 
> 
> (running the nfsstat -m command , from nfsclient verifies it 
> 
> /home/students from csfs7:/home/students/
>  Flags:
> rw,relatime,vers=4,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,
> port=0,timeo=600,retrans=2,sec=sys,clientaddr=x.x.x.x,minorversion=0,
> local_lock=none,addr=Y.Y.Y.Y
> 
> 
> However, we have noticed that we have nfs performance issues, and we first
> suspect the configuration of nfs4.
> 
> Do you think the whole configuration is correct, or do I have to implement
> the fsid=0?
The configuration looks fine...


Note You need to log in before you can comment on or make changes to this bug.