Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-1187 DNE Phase 1: Remote Directories
  3. LU-2754

rename from MDT1 to MDT0 sometimes appears to succeed but does not

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0
    • Lustre 2.4.0
    • 2.3.60-50-g75ae281
    • 6687

    Description

      Here sys_rename is a trivial program that just calls rename(argv[1], argv[2]) and check for error.

      # export MDSCOUNT=2
      # llmount.sh
      # cd /mnt/lustre
      # find .
      .
      ./.lustre
      # lfs mkdir -i 1 m1
      # echo 0 > f0
      # echo 1 > m1/f1
      # find .
      .
      ./f0
      ./m1
      ./m1/f1
      ./.lustre
      # sys_rename m1/f1 f0
      # find .
      .
      ./f0
      ./m1
      ./.lustre
      # cat f0
      0
      # rm f0
      

      In the same situation I can get a simple rename or rename-onto an existing directory on MDT0 to return succeess but lose the old dir.

      # find .
      .
      ./m1
      ./.lustre
      # mkdir d0
      # mkdir m1/d1
      # touch m1/d1/f1
      # find .
      .
      ./d0
      ./m1
      ./m1/d1
      ./m1/d1/f1
      ./.lustre
      # sys_rename m1/d1 d0
      # find .
      .
      ./d0
      ./m1
      ./.lustre
      #
      

      Rename onto may require several attempts:

      # mkdir d0
      # mkdir m1/d1
      # touch m1/d1/f0
      # find .
      .
      ./d0
      ./m1
      ./m1/d1
      ./m1/d1/f0
      ./.lustre
      # sys_rename m1/d1 d0
      cannot rename `m1/d1' to `d0': Directory not empty
      # sys_rename m1/d1 d0
      cannot rename `m1/d1' to `d0': Directory not empty
      # mkdir d2
      #
      # sys_rename m1/d1 d2
      cannot rename `m1/d1' to `d2': Directory not empty
      # sys_rename m1/d1 d2
      cannot rename `m1/d1' to `d2': Directory not empty
      # find .
      .
      ./d0
      ./d2
      ./m1
      ./m1/d1
      ./m1/d1/f0
      ./.lustre
      # mkdir d3
      # sys_rename m1/d1 d3
      # find .
      .
      ./d0
      ./d2
      ./m1
      ./d3
      ./.lustre
      

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: