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

Request for option not to follow symlink when setting project ID

Details

    • New Feature
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • None
    • None
    • lustre 2.7.21.3-ddn33
    • 9223372036854775807

    Description

      Currently, when issuing "lfs project -srp xxxx DIR", command follows symbolic link and set project ID for the target of the link. Customer want a new option not to follow symbolic link.

      Can you please think on implementing a new option?

      They want to have quota based on directory.
      For instance, when there are two users and symlinks are created as follows,

        /home/user01/backup/link01 -> /home/user02/backup/file01
        /home/user02/backup/link02 -> /home/user01/backup/file02
      

      Then, when they issue 'lfs project' command,

        lfs project -p 10001 -s -r /home/user01/backup
        lfs project -p 10002 -s -r /home/user02/backup
      

      Project ID for /home/user01/backup/file02 will be "10002". As they want project IDs for all the files under /home/user01/backup to be "10001", considering this kind of possibility, they need to check all the files under the directory. They just want to simply run a command on a directory.

      Attachments

        Issue Links

          Activity

            [LU-11872] Request for option not to follow symlink when setting project ID

            A possibly better solution instead of adding a specific ioctl for this is to use lgetxattr() and lsetxattr() to get/set the trusted.projid virtual xattr from LU-12056 on symlinks. That will also work for other utilities beyond "lfs project" and also works on ldiskfs-mounted MDTs/OSTs directly.

            adilger Andreas Dilger added a comment - A possibly better solution instead of adding a specific ioctl for this is to use lgetxattr() and lsetxattr() to get/set the trusted.projid virtual xattr from LU-12056 on symlinks. That will also work for other utilities beyond " lfs project " and also works on ldiskfs-mounted MDTs/OSTs directly.

            Patch landed

            wshilong Wang Shilong (Inactive) added a comment - Patch landed

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/44006/
            Subject: LU-11872 quota: add get/set project support for non-dir/file
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b31792b0e72425c8c7850d69837f08c9f3e95a9c

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/44006/ Subject: LU-11872 quota: add get/set project support for non-dir/file Project: fs/lustre-release Branch: master Current Patch Set: Commit: b31792b0e72425c8c7850d69837f08c9f3e95a9c

            Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/44006
            Subject: LU-11872 quota: add get/set project support for non-dir/file
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b34dff90fc6f8d91640f68ee4cf7acfb70bebe17

            gerrit Gerrit Updater added a comment - Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/44006 Subject: LU-11872 quota: add get/set project support for non-dir/file Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b34dff90fc6f8d91640f68ee4cf7acfb70bebe17

            >if it ok to a walkaround ioctl in Lustre before that is better to fix problem completely.. rather than continue https://review.whamcloud.com/#/c/34447 patch.
            I think yes.

            zam Alexander Zarochentsev added a comment - >if it ok to a walkaround ioctl in Lustre before that is better to fix problem completely.. rather than continue https://review.whamcloud.com/#/c/34447 patch. I think yes.

            It might take some time to have vanilla kernel to support get/change projectID, i pushed a series patch to upstream to change projectID, and we might extend statx() to get project ID of files, but that might take few years to be RH kernel, so i was still wondering if it ok to a walkaround ioctl in Lustre before that is better to fix problem completely.. rather than continue https://review.whamcloud.com/#/c/34447 patch? 

            wshilong Wang Shilong (Inactive) added a comment - It might take some time to have vanilla kernel to support get/change projectID, i pushed a series patch to upstream to change projectID, and we might extend statx() to get project ID of files, but that might take few years to be RH kernel, so i was still wondering if it ok to a walkaround ioctl in Lustre before that is better to fix problem completely.. rather than continue  https://review.whamcloud.com/#/c/34447  patch? 

            People

              wshilong Wang Shilong (Inactive)
              mnishizawa Mitsuhiro Nishizawa
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: