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

symlink migration should not create remote inodes

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Lustre 2.14.0
    • Lustre 2.8.0, Lustre 2.13.0, Lustre 2.10.6
    • None
    • 9223372036854775807

    Description

      Migrating a symlink should not leave a remote agent inode on the original MDT in the extremely common case where there is not a hardlink to the symlink (apparently that is possible under POSIX and Linux allows it, who knew?):

      touch tt
      $ ln -s tt tt.link
      $ ln -n tt.link tt.nlink
      $ ls -li tt*
      408143 0 -rw-rw-r-- 1 mythtv  mythtv    0 Nov  6 13:02 tt
      408146 0 lrwxrwxrwx 2 mythtv  mythtv    2 Nov  6 13:02 tt.hlink -> tt
      408146 0 lrwxrwxrwx 2 mythtv  mythtv    2 Nov  6 13:02 tt.link -> tt
      

      Since we can never hold symlinks open and they can never be modified in place (except for renaming them) there is no danger to move the whole symlink to the new MDT during rename instead of leaving a stub agent inode on the original MDT, except in the rare case where the link count > 1.

      Attachments

        Issue Links

          Activity

            [LU-11631] symlink migration should not create remote inodes
            adilger Andreas Dilger made changes -
            Link New: This issue is related to EX-12052 [ EX-12052 ]
            adilger Andreas Dilger made changes -
            Labels Original: exap
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            adilger Andreas Dilger made changes -
            Labels New: exap
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-11872 [ LU-11872 ]
            adilger Andreas Dilger made changes -
            Link Original: This issue is related to DDN-1000 [ DDN-1000 ]
            adilger Andreas Dilger made changes -
            Description Original: Migrating a symlink should not leave a remote agent inode on the original MDT in the extremely common case where there is *not* a hardlink to the symlink (apparently that is possible under POSIX and Linux allows it, who knew?):
            {noformat}
            touch tt
            $ ln -s tt tt.link
            $ ln -n tt.link tt.nlink
            $ ls li- tt*
            408143 0 -rw-rw-r-- 1 mythtv mythtv 0 Nov 6 13:02 tt
            408146 0 lrwxrwxrwx 2 mythtv mythtv 2 Nov 6 13:02 tt.hlink -> tt
            408146 0 lrwxrwxrwx 2 mythtv mythtv 2 Nov 6 13:02 tt.link -> tt
            {noformat}

            Since we can never hold symlinks open and they can never be modified in place (except for renaming them) there is no danger to move the whole symlink to the new MDT during rename instead of leaving a stub agent inode on the original MDT, except in the rare case where the link count > 1.
            New: Migrating a symlink should not leave a remote agent inode on the original MDT in the extremely common case where there is *not* a hardlink to the symlink (apparently that is possible under POSIX and Linux allows it, who knew?):
            {noformat}
            touch tt
            $ ln -s tt tt.link
            $ ln -n tt.link tt.nlink
            $ ls -li tt*
            408143 0 -rw-rw-r-- 1 mythtv mythtv 0 Nov 6 13:02 tt
            408146 0 lrwxrwxrwx 2 mythtv mythtv 2 Nov 6 13:02 tt.hlink -> tt
            408146 0 lrwxrwxrwx 2 mythtv mythtv 2 Nov 6 13:02 tt.link -> tt
            {noformat}

            Since we can never hold symlinks open and they can never be modified in place (except for renaming them) there is no danger to move the whole symlink to the new MDT during rename instead of leaving a stub agent inode on the original MDT, except in the rare case where the link count > 1.
            adilger Andreas Dilger made changes -
            Link New: This issue is related to DDN-1000 [ DDN-1000 ]
            laisiyao Lai Siyao made changes -
            Fix Version/s New: Lustre 2.14.0 [ 14490 ]
            Fix Version/s Original: Lustre 2.13.0 [ 14290 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-11130 [ LU-11130 ]
            adilger Andreas Dilger created issue -

            People

              laisiyao Lai Siyao
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: