Whamcloud - gitweb
LU-14 utils: allow formatting OST without VIRGIN flag 43/7443/6
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 9 Aug 2013 21:03:05 +0000 (15:03 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Sep 2013 21:39:08 +0000 (21:39 +0000)
commitdb6613f5bed1606cc8f97b46d1b298746af03a75
tree91a469c21450fd497c134d5454c8c5e5f4f74e86
parentc54e61cef76eb0e00c9e69729cf4ac8578c90f47
LU-14 utils: allow formatting OST without VIRGIN flag

When reformatting a new target to replace an existing target, the
"mkfs.lustre --replace" option allows formatting an OST (or MDT?)
with the same index as a previously used OST without setting the
LDD_F_VIRGIN flag.

This is required in the case where an OST was lost due to massive
corruption or critical hardware failure.  Otherwise, the newly
formatted target will try to register with the MGS as a new target,
but will be refused by the MGS due to having an already-used index.

The OFD code skips precreating all of the objects in the filesystem
if the MDS requests an object ID too much larger than the current
LAST_ID.  In this case (which can happen if the OST is replaced
or restored from an older backup) only the most recent objects are
precreated, and the deletion of orphans from a too-large precreate
is left to lfsck.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iea57167346627eeb85ac40c17f3ea4596b3ebbe5
Reviewed-on: http://review.whamcloud.com/7443
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/doc/mkfs.lustre.8
lustre/ofd/ofd_obd.c
lustre/tests/conf-sanity.sh
lustre/tests/sanity.sh
lustre/utils/mkfs_lustre.c