+ local start=$(printf %04x $((TGT_FIRST + 1)))
+ TGT=$(for i in $(seq 0x$start 2 0x$TGT_MAX); do \
+ printf "$FSNAME-OST%04x_UUID " $i; done)
+ add_pool $POOL2 "$FSNAME-OST[$start-$TGT_MAX/2]" "$TGT"
+
+ create_dir $dir1 $POOL
+ create_file $dir1/file1 $POOL2 # Should replace $dir1 pool with $POOL2
+ create_dir $dir2 $POOL2
+ touch $dir2/file2 # Should inherit $POOL2 from $dir2
+ mkdir $dir3 # Should inherit $POOL from $dir1
+ $SETSTRIPE -c 1 $dir3 # Should remain existing $POOL
+ touch $dir3/file3 # Should inherit $POOL from $dir3
+ $SETSTRIPE -c 1 $dir2/file4 # Should inherit $POOL2 from dir2
+ $SETSTRIPE -S 64K $dir1/file5 # Should inderit $POOL from $dir1
+
+ check_file_in_pool $dir1/file1 $POOL2
+ check_file_in_pool $dir2/file2 $POOL2
+ check_dir_not_in_pool $dir3 $POOL2
+ check_file_not_in_pool $dir3/file3 $POOL2
+ check_file_not_in_pool $dir2/file4 $POOL
+ check_file_not_in_pool $dir1/file5 $POOL2
+
+ if [ $(lustre_version_code mds1) -ge $(version_code 2.10.54) ]; then
+ check_dir_in_pool $dir3 $POOL
+ check_file_in_pool $dir3/file3 $POOL
+ check_file_in_pool $dir2/file4 $POOL2
+ check_file_in_pool $dir1/file5 $POOL
+ fi