Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18456 TCU: Trash Can/Undelete for Lustre
  3. LU-21049

TCU: avoid orphan MDTXXXX trash object when MDT setup Trash Can

XMLWordPrintable

    • Icon: Technical task Technical task
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      There are these log messages on MDT0002 on mount time. Those only occur on the failed session:

      
      lustre-MDT0000-osp-MDT0002: next log does not exist!
      top_trans_stop(): lustre-MDT0000-osp-MDT0002: write updates failed: rc = -5
      mdt_trash_setup_thread(): lustre-MDT0002: Trash dir setup failed: rc = -5
      

      And this is what Claude said:

      1. At mount, mdt_trash_setup_thread() creates .lustre/.ltrash/MDT0002. The directory object lives on MDT0002 but its name entry is on MDT0000, so the create spans two MDTs.
      2. The setup thread ran before the update log between MDT0002 and MDT0000 was ready, so the first attempt failed with -EIO. It still left a half-made object, [0x280000400:0x2:0x0].
      3. The thread retried and created a second object, [0x280000400:0x5:0x0], which succeeded without logging anything more.
      4. test_118z's cleanup runs a namespace LFSCK and fails on any repair. The MDT0002 debug log shows LFSCK finding both objects claiming the name MDT0002 under the trash dir [0x200000002:0x4:0x0]. It moved 0x2 to lost+found, which gives multiple_referenced_repaired: 1 and the "Expect no namespace repair, but got 1" error.

      Verdict: the race is in existing trash-setup code that the patch doesn't touch (it doesn't change mdt_handler.c). 118z only reports it because its cleanup runs the first LFSCK after mount. Repeating the test in a custom session won't reproduce it, because the race happens once per mount, not once per test run.

            wc-triage WC Triage
            qian_wc Qian Yingjin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: