percent of each other, otherwise the client will prefer to select
.B COUNT
MDT(s) proportional to the free space and inodes on each.
+
+Providing mutiple
+.I MDT_INDEX
+values while trying to set the default striping pattern of subdirectories using
+.B -D
+will not load balance subdirectory creation amongst the MDTs. Instead, this
+will cause all new subdirectories to be striped across all of the specified
+MDTs. This is discouraged and can lead to filesystem problems if too many
+striped directories are created. To do this anyway,
+.B -c N
+must also be specified, where
+.B N
+matches the number of MDT indices given.
.TP
.BR \-H ", " \-\-mdt-hash =\fIHASH_TYPE\fR
Use
}
run_test 33i "striped directory can be accessed when one MDT is down"
+test_33j() {
+ (( $MDSCOUNT >= 2 )) || skip "needs >= 2 MDTs"
+
+ mkdir -p $DIR/$tdir/
+
+ $LFS setdirstripe -D -i0,1 $DIR/$tdir/striped_dir_a &&
+ error "setdirstripe -D -i0,1 incorrectly succeeded"
+
+ $LFS setdirstripe -D -i0,1 -c1 $DIR/$tdir/striped_dir_b &&
+ error "setdirstripe -D -i0,1 -c1 incorrectly succeeded"
+
+ $LFS setdirstripe -D -i0,1 -c3 $DIR/$tdir/striped_dir_c &&
+ error "setdirstripe -D -i0,1 -c3 incorrectly succeeded"
+
+ $LFS setdirstripe -i0,1 $DIR/$tdir/striped_dir_e ||
+ error "-D was not specified, but still failed"
+}
+run_test 33j "lfs setdirstripe -D -i x,y,x should fail"
+
TEST_34_SIZE=${TEST_34_SIZE:-2000000000000}
test_34a() {
rm -f $DIR/f34
bool default_stripe = false;
bool delete = false;
bool foreign_mode = false;
+ bool mdt_count_set = false;
mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;
mode_t previous_mode = 0;
char *xattr = NULL;
progname, optarg);
return CMD_HELP;
}
+ mdt_count_set = true;
break;
case 'd':
delete = true;
lsa.lsa_stripe_count);
}
+ if (default_stripe && lsa.lsa_nr_tgts > 1 && !mdt_count_set) {
+ fprintf(stderr,
+ "%s %s: trying to create unrecommended default striped directory layout,\n"
+ " '-D -i x,y,z' will stripe every new directory across all MDTs,\n"
+ " add -c with the number of MDTs to do this anyway\n",
+ progname, argv[0]);
+ return CMD_HELP;
+ }
+
if (max_inherit_rr != LAYOUT_INHERIT_UNSET &&
lsa.lsa_stripe_off != LLAPI_LAYOUT_DEFAULT &&
lsa.lsa_stripe_off != LMV_OFFSET_DEFAULT) {