[LU-28] Ability for client to mount subdirectories of a Lustre filesystem Created: 20/Dec/10  Updated: 23/Sep/16  Due: 28/Jan/11  Resolved: 18/Apr/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.0.0
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Lai Siyao Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Gantt End to End
has to be finished together with LUDOC-319 Add subdirectory mount feature to manual Resolved
Related
is related to LU-5989 add subdirectory mounting support for... Closed
Severity: 3
Bugzilla ID: 15,267
Epic: metadata, mount
Rank (Obsolete): 9769

 Description   

In kicking around some ideas for the use of Lustre as a replacement for NFS user directories (home and application areas), the thought of being able to export/mount a subdirectory of a Lustre LOV came up.



 Comments   
Comment by Lai Siyao [ 30/Dec/10 ]

Basically there are two ways to implement this:
1. client lookup the filesystem root, and then walk the filesystem (based on the
subdirectory path) and instantiate the subdirectory as the mountpoint root.
This can be implemented entirely on the client and does not require any protocol
changes.
2. change the MDS_GETSTATUS RPC to pass the subdirectory pathname from the client
to the MDS, and have it do the pathname traversal locally and return the "root"
FID for the subdirectory. This needs protocol changes, though simple ones that
can be implemented in a backward-complatible manner.

The advantage of the first way is:

  • no protocol changes.
  • client changes only, no compatibility issue.
  • pathname transversal is more convenient and natural in client, especially for CMD
    which may involve several MDS.

Due to the above advantages this feature will be implemented in the first way.

However there are some limitations:

  • <mountpoint>/.lustre doesn't exist for subdirectory mount. This '.lustre' directory
    is maintained under root directory on MDS for whole filesystem. Though we may create
    a link under subdirectory pointing to it, it may leak fids outside of its namespace.
    Currently the only affected utility is lustre_rsync, but user can do a normal mount
    and apply there (actually lustre_rsync should work on a normal mount, otherwise it
    may not be able to access files out of its namespace).
  • symlink in the subdirectory will not be supported due to the extra complexity.

The following part of code will be changed:

  • llite mount transverse subdirectory path.
  • `lfs fid2path` support subdirectory mount.
Comment by Lai Siyao [ 30/Dec/10 ]

code ready and is being reviewed by Niu and Bobi.

Comment by Kit Westneat (Inactive) [ 18/Dec/12 ]

Has there been any progress on this issue? I haven't seen anything, but I thought I'd check as people have been asking about it.

Comment by Lai Siyao [ 19/Dec/12 ]

The original patch is at http://review.whamcloud.com/#change,165, but it's not up to date. Since it's not urgent, I don't have plan to commit it soon. If someone would like to take over this work, that would be great.

Comment by Kit Westneat (Inactive) [ 11/Jan/13 ]

I rebased it on master, it's here: http://review.whamcloud.com/#change,5007

Comment by Kit Westneat (Inactive) [ 16/Jan/13 ]

Thanks for the review. I'm still new to Gerrit, is there someone I should add for +2?

Comment by Peter Jones [ 16/Jan/13 ]

Kit

No further action is needed - the patch is already in the queue for landing consideration

Peter

Comment by Kit Westneat (Inactive) [ 16/Jan/13 ]

Great, thanks

Comment by Andreas Dilger [ 06/Feb/13 ]

What would also be very useful here for future expansion is to enhance the MDS_GETSTATUS RPC to accept a fileset name, currently always "ROOT", so that this handling can be done by the MDS in the future and the "traverse directory on client" hack can be avoided. That would allow completely independent filesets to be handled by different subtrees on the same MDT. For the initial implementation, the MDT would just check for "ROOT" (if it is sent), and return -ENODEV if it is something else, but it would at least get clients ready for the next step.

Comment by Scott Nolin [ 20/Mar/14 ]

Has this patch been held up just due to the tab/space formatting issues since last January?

We are looking at working around this with bind mounts, and I ran across this patch.

Scott

Comment by Peter Jones [ 20/Mar/14 ]

Scott

Thanks for drawing attention to this.

Lai

Kit has moved on to a new job. Could you please refresh the patch on his behalf?

Thanks

Peter

Comment by Lai Siyao [ 21/Mar/14 ]

As Andreas suggested above, this feature should support mount with fileset name instead of "traverse directory on client" hack. This is not a minor change, I'll update it later.

Comment by Gerrit Updater [ 17/Apr/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/5007/
Subject: LU-28 fileset: add fileset mount support
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9bd3e64b817ccbbf9760864b84908b87e13ebfe8

Comment by Joseph Gmitter (Inactive) [ 18/Apr/16 ]

The patch has landed to master for 2.9.0

Generated at Sat Feb 10 01:03:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.