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

support stripe_index in default LMV stripeEA

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • None
    • 3
    • 15381

    Description

      Currently only default stripe count is supported in striped directory, which is landed on 2.6. We should also support default stripe index, so the subdirectories will be created at the MDT indicated by default stripe index, similar as default stripe index for files. And if the default stripe_index is -1, it will choose MDT evenly among all of MDTs.

      Attachments

        Issue Links

          Activity

            [LU-5523] support stripe_index in default LMV stripeEA

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13360/
            Subject: LU-5523 mdt: add --index option to default dir stripe
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 34e7d46234e5c957e1e815c5267b13fe610a9d8d

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13360/ Subject: LU-5523 mdt: add --index option to default dir stripe Project: fs/lustre-release Branch: master Current Patch Set: Commit: 34e7d46234e5c957e1e815c5267b13fe610a9d8d
            di.wang Di Wang added a comment -

            For old client/new server, the client might send create req to the wrong MDT, then server return -ERESTART, but the old client can not handle it, i.e. it will return -ERESTART to application, which might remind the customer to upgrade their old client to the new client? But considering default striped dir is rare case, it is probably fine?

            For new client/old server, I think client will be able to set the default stripe (index) for the directory. But the old server will not check this, i.e. default stripe index will not be honored, which is fine as well, IMHO.

            di.wang Di Wang added a comment - For old client/new server, the client might send create req to the wrong MDT, then server return -ERESTART, but the old client can not handle it, i.e. it will return -ERESTART to application, which might remind the customer to upgrade their old client to the new client? But considering default striped dir is rare case, it is probably fine? For new client/old server, I think client will be able to set the default stripe (index) for the directory. But the old server will not check this, i.e. default stripe index will not be honored, which is fine as well, IMHO.

            What is the protocol compatibility impact of this patch? Will it break compatibility with older MDS if a new client tries to use this, or vice versa?

            adilger Andreas Dilger added a comment - What is the protocol compatibility impact of this patch? Will it break compatibility with older MDS if a new client tries to use this, or vice versa?

            wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/13360
            Subject: LU-5523 mdt: add --index option to default dir stripe
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 175c37a2b09bafd0992006717e83d656e6df0ebc

            gerrit Gerrit Updater added a comment - wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/13360 Subject: LU-5523 mdt: add --index option to default dir stripe Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 175c37a2b09bafd0992006717e83d656e6df0ebc
            di.wang Di Wang added a comment -

            Another thing needs to be noted is that, when resetting the default EA, the server needs to revoke both LOOKUP and UPDATE lock, so client will rebuild the inode cache and re-get the default stripeEA.

            di.wang Di Wang added a comment - Another thing needs to be noted is that, when resetting the default EA, the server needs to revoke both LOOKUP and UPDATE lock, so client will rebuild the inode cache and re-get the default stripeEA.
            adilger Andreas Dilger added a comment - - edited

            The client will already fetch and cache xattrs with the xattr_cache feature since 2.5 or so. I'm not sure if the current xattr cache will cache for directories.

            adilger Andreas Dilger added a comment - - edited The client will already fetch and cache xattrs with the xattr_cache feature since 2.5 or so. I'm not sure if the current xattr cache will cache for directories.
            di.wang Di Wang added a comment -

            The current implementation requires client to create master object FID on the client side, if we want to support default stripe index, it means client needs to cache these default stripe EA, i.e. it needs to retrieve default stripe EA in every getattr, if the directory also has stripeEA, then it needs to get 2 EA in the normal lookup(getattr) path. I am not sure how to do that yet, 1 RPC with 2 EAs or 2 RPCs. And also there might be some incompatibility issue.

            Another problem is that if we cache default stripeEA, there might also involve some lock cancellation work here, i.e. if the server change the default stripe, client needs to cancel the default stripe.

            di.wang Di Wang added a comment - The current implementation requires client to create master object FID on the client side, if we want to support default stripe index, it means client needs to cache these default stripe EA, i.e. it needs to retrieve default stripe EA in every getattr, if the directory also has stripeEA, then it needs to get 2 EA in the normal lookup(getattr) path. I am not sure how to do that yet, 1 RPC with 2 EAs or 2 RPCs. And also there might be some incompatibility issue. Another problem is that if we cache default stripeEA, there might also involve some lock cancellation work here, i.e. if the server change the default stripe, client needs to cancel the default stripe.

            The implementation of selecting a specific MDT should be a fairly simple patch. Selecting a "good" MDT based on index -1 is probably a significant feature and should be developed as a separate patch.

            adilger Andreas Dilger added a comment - The implementation of selecting a specific MDT should be a fairly simple patch. Selecting a "good" MDT based on index -1 is probably a significant feature and should be developed as a separate patch.

            People

              di.wang Di Wang
              di.wang Di Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: