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)
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>

No differences found