If no arguments are given to "lfs mkdir <newdir>" assume that
"-i -1 -c 1" were given, to create the specified <newdir> on
an MDT with above-average free space/inodes.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I319f68240832a905a86833a70a4631cde5ce7057
Reviewed-on: https://review.whamcloud.com/41054
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Specify a string to be used as a foreign (free format) striping.
.SH NOTE
.PP
+If neither
+.B -c
+or
+.B -i
+are specified,
+.B lfs mkdir
+will default to
+.B -c 1 -i -1
+and create the directory on an MDT that is less full than the others.
+.PP
The
.B lfs setdirstripe
command is only usable by root unless the
if (!delete && lsa.lsa_stripe_off == LLAPI_LAYOUT_DEFAULT &&
lsa.lsa_stripe_count == LLAPI_LAYOUT_DEFAULT && !foreign_mode) {
- fprintf(stderr,
- "%s %s: stripe offset and count must be specified\n",
- progname, argv[0]);
- return CMD_HELP;
+ /* if no parameters set, create directory on least-used MDTs */
+ lsa.lsa_stripe_off = -1;
+ lsa.lsa_stripe_count = 1;
}
if (delete &&