On Thu, Apr 4, 2019 at 11:41 AM Wyllys Ingersoll <wyllys.ingersoll@keepertech.com> wrote:
I have a cephfs filesystem and I want to export a subdirectory of my cephfs tree. Is this possible or do I have to export the entire tree from the root?
You can export a subdirectory, but there is no subtree checking. It's possible for someone to guess filehandles and access files outside the exported directory. See the "no_subtree_check" section in the linux exports(5) manpage. It is generally best to export along filesystem boundaries for that reason.
If it is possible, then is it also possible to define exports for multiple subdirectories of my cephfs FS such as /cephfs/exports/foo and /cephfs/exports/bar as 2 separate exports?
Yes. They will each get their own cephfs client though, so in the event that two clients end up accessing the same inodes via two different exports, performance may suffer. The clients will end up competing with one another for caps. -- Jeff Layton <jlayton@poochiereds.net>