Whamcloud - gitweb
LU-4895 lfsck: not create object to repair dangling by default 89/9989/8
authorFan Yong <fan.yong@intel.com>
Fri, 28 Mar 2014 17:48:03 +0000 (01:48 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 30 Apr 2014 03:41:14 +0000 (03:41 +0000)
commit63e7b15a1baa1aae03dfdc965e0777cf754ff29a
treefa1a6dd489999001a917ebcc166c8f31c8d2db97
parent75df074297cfc8d73561eb4d8290b9d422c156c8
LU-4895 lfsck: not create object to repair dangling by default

If the OST-object which is referenced by some MDT-object does not
exist, the layout LFSCK should not create the lost OST-object by
default; otherwise related application(s) may miss to be aware of
the bad file.

The LFSCK will allow the administrator to specify how to handle
the dangling reference case via a new option "-c" when trigger
the LFSCK:

[-coff] or [--create_ostobj=off]:
Report the inconsistency via log, but keep the dangling reference
there without repairing. (by default)

-c[on] or --create_ostobj[=on]:
Create the lost OST-object.

Change syntax for dryrun:
[-noff] or [--dryrun=off]:
Disable dryrun mode. (by default)

-n[on] or --dryrun[=on]:
Enable dryrun mode.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8fa1e5bbea63c7368e04052c88311a9ea0c6f969
Reviewed-on: http://review.whamcloud.com/9989
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre/lustre_lfsck_user.h
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_lib.c
lustre/tests/sanity-lfsck.sh
lustre/tests/sanity-scrub.sh
lustre/utils/lctl.c
lustre/utils/lustre_lfsck.c