Details
-
Bug
-
Resolution: Fixed
-
Critical
-
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.