Whamcloud - gitweb
LU-1581 utils: mkfs warn about missing --index
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Aug 2012 22:17:10 +0000 (16:17 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 20 Aug 2012 16:11:24 +0000 (12:11 -0400)
Using the --index option to mkfs.lustre is standard practice, and is
documented as required in the Lustre manual.  Add a warning for mkfs
usage in the 2.3 release, so that users with formatting scripts/tools
can be notified of this change in advance of the hard requirement in
Lustre 2.4.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1f481a334163af1033da5296f9e71fb3b4cee07e
Reviewed-on: http://review.whamcloud.com/3703
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/mkfs_lustre.c

index fee1d03..483f512 100644 (file)
@@ -626,6 +626,12 @@ int main(int argc, char *const argv[])
                 ret = EINVAL;
                 goto out;
         }
                 ret = EINVAL;
                 goto out;
         }
+
+       if (IS_OST(ldd) && (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 0
         /*
          * Comment out these 2 checks temporarily, since for multi-MDSes
 #if 0
         /*
          * Comment out these 2 checks temporarily, since for multi-MDSes