All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wendy Cheng <wcheng@redhat.com>
To: Jason Keltz <jas@cse.yorku.ca>
Cc: James Pearson <james-p@moving-picture.com>, nfs@lists.sourceforge.net
Subject: Re: fsid question
Date: Tue, 27 Mar 2007 10:52:50 -0400	[thread overview]
Message-ID: <46092FC2.2080901@redhat.com> (raw)
In-Reply-To: <46091C41.6070908@cse.yorku.ca>

Jason Keltz wrote:
> .........................................If the system is generating 
> an fsid for NFS exports in the absence of a user-specified fsid, then 
> changing the fsid and re-exporting the filesystem *should* essentially 
> confuse the client? How does one choose an fsid that is not already in 
> use on the system? I imagine there must be some way to list the 
> currently used fsids for exported filesystems.
>   

I think I see where the confusion comes from. To understand this, let's 
start with a thing called NFS "file handle".

When an NFS client request file access, server packages few info into a 
max 64 bytes identifier called "file handle" that is sent back to 
client. Depending on the version of Linux OS you have, it may consist of 
file inode number, directory inode number, export device major and minor 
number, or the admin-specified "fsid", etc. If the /etc/exports doesn't 
specify an "fsid", then the major and minor numbers of the exported 
device are used. Each file handle has a field called "fsid-type" to tell 
whether this file handle uses admin-specified "fsid" or device 
major-minor number.

In your case, the current FileHandle sent to NFS clients uses device 
major and minor numbers. You can safely pick *any* number you like as 
the fsid and re-exports the entries (say by doing an "exportfs -a" 
command). Any *new* NFS client requests will get a new FileHandle that 
uses the specified "fsid". However, the *existing" FileHandle(s) any NFS 
client still keeps and uses will have the "old" way - that is the device 
major-minor pair. The server knows how to interpret them (based on the 
type specified in the "fsid-type" field of the file handle).

This implies the following:

1. If server for whatever reason gets rebooted and somehow the device 
major-minor number gets altered, the client that keeps the "old" file 
handle will get a "stale file handle" error. Some of the NFS clients 
will re-do lookup to obtain the correct FileHandle(s). Some of them will 
simply fail. There is really not much you can do as a system administrator.
2. You want to keep the "fsid" same (and unique) for obvious reasons 
after you export them.
3. Any 32 bit integer can be used (say, 1, 2, 3, etc - no need to use 
hex number).

-- 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

  parent reply	other threads:[~2007-03-27 15:12 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
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 [this message]
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=46092FC2.2080901@redhat.com \
    --to=wcheng@redhat.com \
    --cc=james-p@moving-picture.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.