Linux NFS development
 help / color / mirror / Atom feed
From: Ming Lei <mlei@riverbed.com>
To: linux-nfs@vger.kernel.org
Subject: nfs4.1  pseudo filesystem
Date: Thu, 10 Oct 2013 21:39:38 +0000 (UTC)	[thread overview]
Message-ID: <loom.20131010T232229-437@post.gmane.org> (raw)


I want to set up the real directory as the root of the pseudo filesystem 
got exported from the server. Can I do it or I have to create /export 
empty directory as the root of the pseudo FS and then bind the real 
directories?

I have this test, both server and client running 3.11.0+:

On the server, there is /root directory.
[root@xxx ~] ls /root
anaconda-ks.cfg  disk    Documents  fs_log.old   install.log.syslog  Public
Desktop          disk.c  Downloads  install.log  linux3              
rpmbuild
[root@xxx ~]# ls /root/Downloads/linux-2.6.39.4
arch       crypto         firmware  Kconfig      Module.symvers  security
block      cscope.in.out  fs        kernel       net             sound
config     cscope.out     include   lib          README          tools
config-rh  cscope.po.out  init      MAINTAINERS  REPORTING-BUGS  usr
COPYING    Documentation  ipc       Makefile     samples         virt
CREDITS    drivers        Kbuild    mm           scripts

I have this /etc/exports on the server:
/root *(ro,fsid=0,crossmnt,no_root_squash)
/root/Downloads/linux-2.6.39.4 *(rw,no_root_squash,nohide)
/root/linux3/Documentation/filesystems *(rw,no_root_squash,nohide)

[root@xxx ~]# cat /proc/net/rpc/nfsd.export/content 
#path domain(flags)
# /root/.gvfs	*()
/root	*
(ro,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,fsid=0,uuid=46bb42
56:d3c84b6f:bbbfff3a:8b0d912c)
[root@xxx ~]# cat /proc/net/rpc/nfsd.fh/content 
#domain fsidtype fsid [path]
* 1 0x00000000 /root


On the client side, what I saw:
[root@xxx /]# mount -o vers=4.1 10.1.13.66:/ /mnt
[root@xxx /]# cd /mnt
[root@xxx mnt]# ls
anaconda-ks.cfg  disk    Documents  fs_log.old   install.log.syslog  Public
Desktop          disk.c  Downloads  install.log  linux3              
rpmbuild
[root@xxx mnt]# cd Downloads/linux-2.6.39.4
[root@xxx linux-2.6.39.4]# ls
arch       COPYING        cscope.out     firmware  ipc      lib          
Module.symvers  samples   tools
block      CREDITS        cscope.po.out  fs        Kbuild   MAINTAINERS  
net             scripts   usr
config     crypto         Documentation  include   Kconfig  Makefile     
README          security  virt
config-rh  cscope.in.out  drivers        init      kernel   mm           
REPORTING-BUGS  sound
[root@xxx linux-2.6.39.4]# rm REPORTING-BUGS 
rm: remove regular file `REPORTING-BUGS'? y
rm: cannot remove `REPORTING-BUGS': Read-only file system

The question is:
Why can I delete this file even I specify the 
mountpoint /root/Downloads/linux-2.6.39.4 to allow RW access?

Thanks
Ming


             reply	other threads:[~2013-10-10 21:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 21:39 Ming Lei [this message]
2013-10-11 16:30 ` nfs4.1 pseudo filesystem J. Bruce Fields
2013-10-11 16:51   ` Ming Lei
2013-10-11 18:29     ` J. Bruce Fields
2013-10-11 20:58       ` J. Bruce Fields
2013-10-11 21:04         ` Chuck Lever
2013-10-12  6:40 ` Wangminlan

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=loom.20131010T232229-437@post.gmane.org \
    --to=mlei@riverbed.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox