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

add mechanisms to get client UUID from mountpoint

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The client mountpoint UUID is used in some parts of the code to uniquely identify the client mountpoint to the server, in case there are multiple (distinct) mounts of the same filesystem on a single client. This mountpoint UUID is shown in the client llite.*.uuid file, all mdc.*.uuid, and osc.*.uuid parameters, as well as on the server in obdfilter,mdt.*.exports.*.export

      It would be useful to have a mechanism to get the client mountpoint UUID directly from the mountpoint, rather than only from llite.*.uuid. Otherwise, it is necessary to get this indirectly via "lfs getname" to find the mount instance, and then "llite.INSTANCE.uuid" to get the UUID.

      The lfs getname command should add a "-u" option to print the mountpoint UUID that can be fetched from the mountpoint (or any file) via a new OBD_IOC_GETUUID = _IOR('f', 127, char[UUID_MAX]) ioctl (for both files and directories), and there should also be a virtual MOUNTPOINT/.lustre/uuid file that prints the UUID for that specific mountpoint.

      Attachments

        Issue Links

          Activity

            [LU-18076] add mechanisms to get client UUID from mountpoint

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/56437/
            Subject: LU-18076 lfs: get client UUID by "lfs getname -u"
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: fdec92fb6ccd205f094aae8058ccba3e5a18e5ec

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/56437/ Subject: LU-18076 lfs: get client UUID by "lfs getname -u" Project: fs/lustre-release Branch: master Current Patch Set: Commit: fdec92fb6ccd205f094aae8058ccba3e5a18e5ec

            That patch is a work in progress for .lustre being visible to any fileset. Currently it doesn't work.

            simmonsja James A Simmons added a comment - That patch is a work in progress for .lustre being visible to any fileset. Currently it doesn't work.

            James, having the UUID available in the .lustre directory doesn't really have anything to do with filesets. It is just a convenience for test scripts, and I thought the .lustre directory is now available in filesets anyway?

            And on the third hand, Emoly has already made a patch to add "lfs getname -u" to get the mountpoint UUID from any directory in the filesystem, and this would also work with filesets even if .lustre is not available (eg. bind mounts).

            adilger Andreas Dilger added a comment - James, having the UUID available in the .lustre directory doesn't really have anything to do with filesets. It is just a convenience for test scripts, and I thought the .lustre directory is now available in filesets anyway? And on the third hand, Emoly has already made a patch to add "lfs getname -u" to get the mountpoint UUID from any directory in the filesystem, and this would also work with filesets even if .lustre is not available (eg. bind mounts).
            simmonsja James A Simmons added a comment - - edited

            Getting the uuid from .lustre is a bad idea. Its not fileset aware. What we need need to do is have UUID apart of the device name instead. I have been wanted to do this for some time. Let me look into doing that. With that approach this will become much easier.

            simmonsja James A Simmons added a comment - - edited Getting the uuid from .lustre is a bad idea. Its not fileset aware. What we need need to do is have UUID apart of the device name instead. I have been wanted to do this for some time. Let me look into doing that. With that approach this will become much easier.

            "Emoly Liu <emoly@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56526
            Subject: LU-18076 .lustre: add MOUNTPINT/.lustre/uuid
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cd5dd5ca13b766aace513829e2e21241e04813e2

            gerrit Gerrit Updater added a comment - "Emoly Liu <emoly@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56526 Subject: LU-18076 .lustre: add MOUNTPINT/.lustre/uuid Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cd5dd5ca13b766aace513829e2e21241e04813e2

            "Emoly Liu <emoly@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56437
            Subject: LU-18076 lfs: get client UUID by "lfs getname -u"
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: cda690f43ca9258430c0ed0facd6bdfa6b5a4aca

            gerrit Gerrit Updater added a comment - "Emoly Liu <emoly@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/56437 Subject: LU-18076 lfs: get client UUID by "lfs getname -u" Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: cda690f43ca9258430c0ed0facd6bdfa6b5a4aca

            This should be done in two separate patches, the first patch for the "lfs getname -u" option (+ test case), and the second patch for adding the .lustre/uuid file (+ test case), since they are quite different parts of the code.

            adilger Andreas Dilger added a comment - This should be done in two separate patches, the first patch for the " lfs getname -u " option (+ test case), and the second patch for adding the .lustre/uuid file (+ test case), since they are quite different parts of the code.

            People

              emoly.liu Emoly Liu
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: