Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-28

Ability for client to mount subdirectories of a Lustre filesystem

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • Lustre 2.0.0
    • 3
    • 15,267
    • 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.

      Attachments

        Issue Links

          Activity

            [LU-28] Ability for client to mount subdirectories of a Lustre filesystem
            pjones Peter Jones added a comment -

            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

            pjones Peter Jones added a comment - 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

            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

            sknolin Scott Nolin (Inactive) added a comment - 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

            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.

            adilger Andreas Dilger added a comment - 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.

            Great, thanks

            kitwestneat Kit Westneat (Inactive) added a comment - Great, thanks
            pjones Peter Jones added a comment -

            Kit

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

            Peter

            pjones Peter Jones added a comment - Kit No further action is needed - the patch is already in the queue for landing consideration Peter

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

            kitwestneat Kit Westneat (Inactive) added a comment - Thanks for the review. I'm still new to Gerrit, is there someone I should add for +2?

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

            kitwestneat Kit Westneat (Inactive) added a comment - I rebased it on master, it's here: http://review.whamcloud.com/#change,5007
            laisiyao Lai Siyao added a comment -

            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.

            laisiyao Lai Siyao added a comment - 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.

            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.

            kitwestneat Kit Westneat (Inactive) added a comment - 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.
            laisiyao Lai Siyao added a comment -

            code ready and is being reviewed by Niu and Bobi.

            laisiyao Lai Siyao added a comment - code ready and is being reviewed by Niu and Bobi.
            laisiyao Lai Siyao added a comment -

            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.
            laisiyao Lai Siyao added a comment - 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.

            People

              wangshilong Wang Shilong (Inactive)
              laisiyao Lai Siyao
              Votes:
              0 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: