[LU-5867] LFSCK: --create_mdtobj flag does not work for ‘lctl lfsck_start’ Created: 05/Nov/14  Updated: 03/Dec/14  Resolved: 03/Dec/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Critical
Reporter: James Nunez (Inactive) Assignee: James Nunez (Inactive)
Resolution: Fixed Votes: 0
Labels: HB, LFSCK

Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by James Nunez (Inactive) [ 05/Nov/14 ]

Proposed patch at http://review.whamcloud.com/#/c/12578/1

Comment by Gerrit Updater [ 15/Nov/14 ]

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

Comment by Gerrit Updater [ 15/Nov/14 ]

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

Comment by Gerrit Updater [ 03/Dec/14 ]

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

Comment by Jodi Levi (Inactive) [ 03/Dec/14 ]

Patch landed to Master.

Generated at Sat Feb 10 01:55:12 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.