X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Fmkfs_lustre.c;h=2e24134a76c9356ec24d566419822c0a7bc65da1;hp=392e4f16a1700ad4df57cd2b8c1717ae065c76f2;hb=7712ab3fd86e88f7a8e7d6eb9c82492a8b39a61c;hpb=b32074ad81953df481e620e4dbf011b77ad96a53 diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 392e4f1..2e24134 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -639,11 +639,17 @@ int main(int argc, char *const argv[]) goto out; } - if (IS_OST(ldd) && (mop.mo_ldd.ldd_flags & LDD_F_NEED_INDEX)) + if (mop.mo_ldd.ldd_flags & LDD_F_NEED_INDEX) fprintf(stderr, "warning: %s: for Lustre 2.4 and later, the " "target index must be specified with --index\n", mop.mo_device); + /* If no index is supplied for MDT by default set index to zero */ + if (IS_MDT(ldd) && (ldd->ldd_svindex == INDEX_UNASSIGNED)) { + mop.mo_ldd.ldd_flags &= ~LDD_F_NEED_INDEX; + mop.mo_ldd.ldd_svindex = 0; + } + #if 0 /* * Comment out these 2 checks temporarily, since for multi-MDSes