All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lioupayphone" <lioupayphone@gmail.com>
To: "Steve Dickson" <SteveD@redhat.com>
Cc: "linux-nfs" <linux-nfs@vger.kernel.org>
Subject: Re: Re: what's the real meaning of fsid?
Date: Thu, 18 Dec 2008 09:16:22 +0800	[thread overview]
Message-ID: <200812180916175465416@gmail.com> (raw)
In-Reply-To: 200812171336070316863@gmail.com

Hello, Steve Dickson.
you wrote about "Re: what's the real meaning of fsid?" at 06:34:20 on 2008-12-18 :
thank you for your attentions. and i did a retry. the results were listed below.
>
>
>lioupayphone wrote:
>> Hello, everyone. 
>> 
>> fsid in /etc/exports was used for identifying a file system. if a file system which exported 2 directories, it seems that we should tag the two export entries with same fsid.
>> 
>> eg
>> on one machine (server   10.10.37.147,  Centos5.2 with linux2.6.18):
>> 
>> #mkfs.ext3 /dev/sdc; mount /dev/sdc /mnt/;mkdir -p /mnt/dir1 /mnt/dir2; touch /mnt/dir1/wall-e /mnt/dir2/eva;
>> #echo "/mnt/dir1 *(rw,async,root_squash,fsid=2)" > /etc/exports
>> #echo "/mnt/dir2 *(rw,async,root_squash,fsid=2)" >> /etc/exports
>> #service nfs start && exportfs -r
>> 
>> on another machine (client   10.10.37.154):
>> #mount  10.10.37.147:/mnt/dir1 /mnt/1/ && mount 10.10.37.147:/mnt/dir2 /mnt/2/
>> 
>> i am puzzled:   on the client (10.10.37.154), i found both "/mnt/1/" and "/mnt/2/" have the same child ---- "wall-e".
>> 
>> so i browsed the code of 2.6.18 and found: exp_export(), fs/nfsd/export.c . i have taged a comment on this code listed below. please give me some suggestions. thx.
>I'm a bit puzzled by "both "/mnt/1/" and "/mnt/2/" have the same child". 
>Do mean they have the same file handle??
>
>steved.
>
yes, both the two directories have a same FH.
when i "cat /proc/fs/nfsd/exports ", it shows :
# Version 1.1
# Path Client(Flags) # IPs
/mnt/dir1       *(rw,root_squash,async,wdelay,no_subtree_check,fsid=2)
/mnt/dir2       *(rw,root_squash,async,wdelay,no_subtree_check,fsid=2) 

and i "rpc.mountd -d all", and try do mount on client: 
	mount -t nfs -o nolock 10.10.37.147:/mnt/dir1 /mnt/1/; 
	mount -t nfs -o nolock 10.10.37.147:/mnt/dir2 /mnt/2/;

the log on server (/var/log/messages) shows:

Dec 18 09:06:37 nike mountd[21018]: MNT3(/mnt/dir1) called
Dec 18 09:06:37 nike mountd[21018]: authenticated mount request from 10.10.37.154:981 for /mnt/dir1 (/mnt/dir1)
Dec 18 09:06:43 nike mountd[21018]: MNT3(/mnt/dir1) called
Dec 18 09:06:43 nike mountd[21018]: authenticated mount request from 10.10.37.154:983 for /mnt/dir1 (/mnt/dir1)
Dec 18 09:06:43 nike mountd[21018]: nfsd_fh: inbuf '* 1 \x02000000'
Dec 18 09:06:43 nike mountd[21018]: /mnt/dir1 and /mnt/dir2 have same filehandle for *, using first
Dec 18 09:06:43 nike mountd[21018]: nfsd_fh: found 0x2ac56363a0b0 path /mnt/dir1
Dec 18 09:06:50 nike mountd[21018]: MNT3(/mnt/dir2) called
Dec 18 09:06:50 nike mountd[21018]: authenticated mount request from 10.10.37.154:986 for /mnt/dir2 (/mnt/dir2)

in kernel, /mnt/dir1 and /mnt/dir2 respectively corresponds to   two different svc_export objects. 
in fh_compose(), they have same fsid_type and fsid, but the fileidtype and fileid should NOT be same.
i am still in puzzled. :-(

btw : "nike" is the hostname of server. :-)




Best Regards!
lioupayphone


  parent reply	other threads:[~2008-12-18  1:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  5:36 what's the real meaning of fsid? lioupayphone
2008-12-17 22:32 ` Steve Dickson
2008-12-18  1:16 ` lioupayphone [this message]
2008-12-18 15:21   ` Steve Dickson
2008-12-18 19:03 ` J. Bruce Fields
2008-12-19 15:04 ` lioupayphone

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=200812180916175465416@gmail.com \
    --to=lioupayphone@gmail.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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.