All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wendy Cheng <wcheng@redhat.com>
To: Jason Keltz <jas@cse.yorku.ca>
Cc: nfs@lists.sourceforge.net
Subject: Re: fsid question
Date: Mon, 26 Mar 2007 17:00:36 -0400	[thread overview]
Message-ID: <46083474.8090906@redhat.com> (raw)
In-Reply-To: <46082D10.1060301@cse.yorku.ca>

Jason Keltz wrote:
> Hi.
>
> I'm running a RedHat Enterprise 4 system.
>
> I have a question about the fsid option in /etc/exports that I was 
> hoping someone might be able to help with.
>
> I am working with LVM under Linux.  If I export LVM volumes via NFS, the 
> fsid is based on major/minor number.  
This statement needs correction. An NFS fsid is not based on major/minor 
numbers - it is is a 32 bit number that admin (root) can arbitrary 
choose and use to uniquely identify an NFS export. More on this in the 
following comment.
> If I then remove a logical volume 
> on the NFS server and reboot the server, the major and minor numbers for 
> the other volumes are adjusted, which of course causes problems for the 
> existing NFS exports (which either end up stale/pointing to a different 
> logical volume)!   The fsid option would fix this by allowing me to 
> specify a number independent of major/minor number.
>   
This is correct (fsid option would allow admin to identify an NFS 
export, independent of major/minor number).
> A couple of questions:
>
> 1) How do I find out the fsid of an existing export so that I can 
> "hard-code" it in the /etc/exports file?
>   
The admin (root, or whoever has access rights to /etc/exports file) can 
pick one number between 0 and 0xffffffff and add it into /etc/exports. 
It comes and goes with each "exportfs" command. This id is used to 
construct NFS filehandle that will be sent to NFS client upon requests. 
NFS client uses file handle to communicate with NFS server on which file 
they want to have access. The fsid, if specified, is part of the file 
handle that uniquely identifies an export (one entry in /etc/exports file).

So as rule of thumb, you would not want to change fsid as long as there 
are NFS clients still out there trying to access the files on the 
server. It is, however, not a permanent ID since there is no filesystem 
"on-disk" record of it.
> 2) For filesystems that are not mounted, how do I choose a number that 
> the system will not try to allocate to a different nfs export that isn't 
> using the fsid option?  Will the system check existing fsids, or it just 
> allocated the fsid based on a formula?
>   
No, NFS fsid is *not* allocated (nor generated) by system. There is no 
co-relation between the physical filesystem and NFS fsid, if the 
filesystem is not NFS exported. Note that a filesystem can be mounted 
but not NFS exported - in this case, the filesystem will not recognize 
the NFS fsid. I suspect that you confuse fsid with either filehandle or 
some specific filesystem implementation fsid (few cluster filesystems I 
know of have its own fsid - but it differs from the "NFS" fsid we 
discuss here).
> 3) What is the best way for me to generate my own fsid?
>   
It is a number picked by admin and must be between 0 and 0xFFFFFFFF.

Hopefully this makes things clear (since our cluster suites use NFS fsid 
extensively).

-- Wendy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-03-26 21:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 20:29 fsid question Jason Keltz
2007-03-26 21:00 ` Wendy Cheng [this message]
2007-03-27 12:50   ` Jason Keltz
2007-03-27 12:56     ` James Pearson
2007-03-27 13:29       ` Jason Keltz
2007-03-27 14:27         ` James Pearson
2007-03-27 14:57           ` Jason Keltz
2007-03-27 15:05             ` J. Bruce Fields
2007-03-27 14:52         ` Wendy Cheng
2007-03-27 15:23           ` J. Bruce Fields
2007-03-27 15:32             ` Trond Myklebust
2007-03-27 15:31           ` Roger Heflin
2007-03-29 13:54   ` Chris Osicki
2007-03-29 14:23     ` Wendy Cheng
     [not found] <mailman.7028.1175219061.5558.nfs@lists.sourceforge.net>
2007-03-30  6:38 ` Klaus Steinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46083474.8090906@redhat.com \
    --to=wcheng@redhat.com \
    --cc=jas@cse.yorku.ca \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.