Whamcloud - gitweb
LU-14 utils: allow formatting OST without VIRGIN flag 59/8159/6
authorBob Glossman <bob.glossman@intel.com>
Mon, 4 Nov 2013 15:18:27 +0000 (07:18 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Nov 2013 06:32:56 +0000 (06:32 +0000)
commitd69538b3c370460101e5e52d3164a54542dc31e0
treeaea7dc670f65b818b7f732cdc148cc7e334f6c5e
parent2545c376af7c1cf13b8602d22fc1cc45b4681984
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.

Lustre-commit: db6613f5bed1606cc8f97b46d1b298746af03a75
Lustre-change: http://review.whamcloud.com/7443

Test-Parameters: testlist=conf-sanity envdefinitions=SLOW=yes

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.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>
Change-Id: I5b773bd7116df4d7875ff31bdd0c873377f83116
Reviewed-on: http://review.whamcloud.com/8159
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@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