Re: Re: what's the real meaning of fsid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux