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

LFSCK: --create_mdtobj flag does not work for ‘lctl lfsck_start’

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.7.0
    • Lustre 2.7.0
    • 3
    • 16415

    Description

      When running ‘lctl lfsck_start’ with the ‘--create_mdtobj’ flag, we get an error:

      # lctl lfsck_start -A -M scratch-MDT0000 -r -t namespace --create_mdtobj on
      lfsck_start: unrecognized option '--create_mdtobj'
      Invalid option, '-h' for help.
      

      When the ‘-C’ option is used, there is no error, but “create_mdtobj” does not show up in the param line in the lfsck_namespace file:

       
      # lctl lfsck_start -A -M scratch-MDT0000 -r -t namespace -c -C -o
      Started LFSCK on the device scratch-MDT0000: scrub namespace
      # cat /proc/fs/lustre/mdd/scratch-MDT0000/lfsck_namespace 
      name: lfsck_namespace
      magic: 0xa0629d03
      version: 2
      status: completed
      flags:
      param: all_targets,orphan,create_ostobj,
      time_since_last_completed: 9 seconds
      …
      

      It looks like “create_mdtobj” needs to be added to the input options long_opt_start in lustre_lfsck.c

       
      static struct option long_opt_start[] = {
              {"device",              required_argument, 0, 'M'},
              {"all",                 no_argument,       0, 'A'},
              {"create_ostobj",       optional_argument, 0, 'c'},
              {"error",               required_argument, 0, 'e'},
              {"help",                no_argument,       0, 'h'},
              {"dryrun",              optional_argument, 0, 'n'},
              {"orphan",              no_argument,       0, 'o'},
              {"reset",               no_argument,       0, 'r'},
              {"speed",               required_argument, 0, 's'},
              {"type",                required_argument, 0, 't'},
              {"window_size",         required_argument, 0, 'w'},
              {0,                     0,                 0,  0 }
      };
      

      and to the lfsck_param_names array in lfsck_lib.c

       
      const char *lfsck_param_names[] = {
      	NULL,
      	"failout",
      	"dryrun",
      	"all_targets",
      	"broadcast",
      	"orphan",
      	"create_ostobj",
      	NULL
      };
      

      I will upload a patch for this.

      Attachments

        Activity

          [LU-5867] LFSCK: --create_mdtobj flag does not work for ‘lctl lfsck_start’

          Patch landed to Master.

          jlevi Jodi Levi (Inactive) added a comment - Patch landed to Master.

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12578/
          Subject: LU-5867 lfsck: Enable --create_mdtobj flag
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: b5b882f05e2436f1419b5692cc567e92d1cb5b33

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12578/ Subject: LU-5867 lfsck: Enable --create_mdtobj flag Project: fs/lustre-release Branch: master Current Patch Set: Commit: b5b882f05e2436f1419b5692cc567e92d1cb5b33

          Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/12578
          Subject: LU-5867 lfsck: Enable --create_mdtobj flag
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 4
          Commit: 8d359a765128825fc2f9e37aa9db6f9c0198097c

          gerrit Gerrit Updater added a comment - Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/12578 Subject: LU-5867 lfsck: Enable --create_mdtobj flag Project: fs/lustre-release Branch: master Current Patch Set: 4 Commit: 8d359a765128825fc2f9e37aa9db6f9c0198097c

          Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/12578
          Subject: LU-5867 lfsck: Enable --create_mdtobj flag
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 3
          Commit: 46d929fe9458d4ba76456003970017f9a9f248a4

          gerrit Gerrit Updater added a comment - Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/12578 Subject: LU-5867 lfsck: Enable --create_mdtobj flag Project: fs/lustre-release Branch: master Current Patch Set: 3 Commit: 46d929fe9458d4ba76456003970017f9a9f248a4
          jamesanunez James Nunez (Inactive) added a comment - Proposed patch at http://review.whamcloud.com/#/c/12578/1

          People

            jamesanunez James Nunez (Inactive)
            jamesanunez James Nunez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: