Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.14.0
    • Lustre 2.14.0, Lustre 2.12.5
    • 3
    • 9223372036854775807

    Description

      I created a subdirectory and put a mirrored file in it. When I tried to migrate the mirrored file to another MDT, it returned an error migrating the mirrored file that I didn't expect:

      tests# lfs mkdir -i 0 /mnt/testfs/dir1
      tests# cp /etc/hosts /mnt/testfs/dir1
      tests# lfs mirror extend -N1 /mnt/testfs/dir1/hosts
      tests# lfs migrate -m 1 /mnt/testfs/dir1
      lfs migrate: /mnt/testfs/dir1/hosts migrate failed: Operation not supported (95)
      tests# lfs getstripe -m /mnt/testfs/dir1
      1
      tests# lfs getstripe -m /mnt/testfs/dir1/hosts
      0
      

      So it seems like the directory was migrated, but the mirrored file was not. Is there some reason that the mirrored file could not be migrated? I don't think that should be any different than migrating some other composite file.

      Attachments

        Issue Links

          Activity

            [LU-13424] unable to migrate mirrored files
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38257/
            Subject: LU-13424 mdt: fix DOM entry check
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 8f6b0aacc0e905bad7aebddfd838cbd610f17483

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38257/ Subject: LU-13424 mdt: fix DOM entry check Project: fs/lustre-release Branch: master Current Patch Set: Commit: 8f6b0aacc0e905bad7aebddfd838cbd610f17483

            I've made patch for this issue just to avoid dependencies on alternative patch and to have the example for b2_12 and any other releases

            tappro Mikhail Pershin added a comment - I've made patch for this issue just to avoid dependencies on alternative patch and to have the example for b2_12 and any other releases

            Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38257
            Subject: LU-13424 mdt: fix DOM entry check
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: a5aa82d0908a3c3070d7b7ef58ddc2f1f84af533

            gerrit Gerrit Updater added a comment - Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38257 Subject: LU-13424 mdt: fix DOM entry check Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: a5aa82d0908a3c3070d7b7ef58ddc2f1f84af533

            Patch is simple, just initialize that has_dom with false and it should be fixed in older releases, but I am not sure about master because https://review.whamcloud.com/#/c/38152 fixes that already though in different manner.

            tappro Mikhail Pershin added a comment - Patch is simple, just initialize that has_dom with false and it should be fixed in older releases, but I am not sure about master because https://review.whamcloud.com/#/c/38152 fixes that already though in different manner.

            There is mistake in variable initialization:

            static inline int mdt_lmm_dom_entry(struct lov_mds_md *lmm)
            {
            	struct lov_comp_md_v1 *comp_v1;
            	struct lov_mds_md *v1;
            	__u32 off;
            	bool has_dom = true;
            	               ^^^
             

            Default value should be false, because at the end there is:

            	return has_dom ? LMM_DOM_ONLY : LMM_NO_DOM
            

            So even if DOM stripe wasn't found and has_dom is not set, it is still true by default

            tappro Mikhail Pershin added a comment - There is mistake in variable initialization: static inline int mdt_lmm_dom_entry(struct lov_mds_md *lmm) { struct lov_comp_md_v1 *comp_v1; struct lov_mds_md *v1; __u32 off; bool has_dom = true ; ^^^   Default value should be false , because at the end there is: return has_dom ? LMM_DOM_ONLY : LMM_NO_DOM So even if DOM stripe wasn't found and has_dom is not set, it is still true by default

            People

              tappro Mikhail Pershin
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: