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

MDS allows "lfs setstripe" to mark last mirror as stale

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.11.0, Lustre 2.13.0, Lustre 2.12.2
    • Fix Version/s: Lustre 2.13.0, Lustre 2.12.3
    • Labels:
      None
    • Severity:
      3
    • Rank (Obsolete):
      9223372036854775807

      Description

      A trivial modification to sanity-flr test_0h shows a serious problem.

      If we write to the file before changing the layout flags, the file metadata is corrupted:

       lfs mirror create -N -E 1M -S 1M --flags=prefer -E eof -N2 tfile
       echo 1 > tfile
      #set flags to the first component
       lfs setstripe --comp-set -I 0x10001 --comp-flags=^prefer,stale tfile
      ls -la 
       ls: cannot access tfile: Input/output error
       total 16
       drwxr-xr-x 3 root root 4096 Oct 9 13:00 .
       drwxr-xr-x. 43 root root 122880 Sep 27 22:49 ..
       -?????????? ? ? ? ? ? tfile

       So this corrupts the layout.  I tried adding https://review.whamcloud.com/#/c/32847/ (LU-11158 mdt: grow lvb buffer to hold layout) and it did not resolve this issue.

       

      But additionally, I'm not sure what the correct behavior is here - should it be possible to remove the prefer flag in this situation, while the other replicas are stale?

       

      And to set stale on the write replica?  (That, at least, seems clearly incorrect.)

      The effect of this (... if it worked ...) would presumably be that all the replicas are stale, which would be unresolvable, and so should not be allowed.  (Separate from the corruption)

      There are various implications here.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yujian Jian Yu
              Reporter:
              paf Patrick Farrell (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: