}
run_test 127 "direct io overwrite on full ost"
+test_128()
+{
+ combined_mgs_mds && skip "need separate mgs device"
+ [ "$ost2_FSTYPE" == zfs ] && import_zpool ost2
+
+ format_ost 2
+ # Try to apply nolocallogs to the virgin OST. Should fail.
+ do_facet ost2 "$TUNEFS --nolocallogs $(ostdevname 2)" &&
+ error "nolocallogs should not be allowed on the virgin target"
+
+ setupall
+ stopall
+
+ [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1
+ # Start OST without MGS (local configs)
+ do_facet ost1 "$TUNEFS --dryrun $(ostdevname 1)"
+ start_ost || error "unable to start OST1"
+ stop_ost || error "Unable to stop OST1"
+
+ [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1
+ # Do not allow reading local configs, should fail
+ do_facet ost1 "$TUNEFS --nolocallogs $(ostdevname 1)" ||
+ error "Can not set nolocallogs"
+ start_ost && error "OST1 started, but should fail"
+
+ # Connect to MGS successfully, reset nolocallogs flag
+ [ "$ost1_FSTYPE" == zfs ] && import_zpool ost1
+ start_mgs || error "unable to start MGS"
+ start_ost || error "unable to start OST1"
+
+ do_facet ost1 "$TUNEFS --dryrun $(ostdevname 1)" | grep "nolocallogs" &&
+ error "nolocallogs expected to be reset"
+
+ stop_ost || error "Unable to stop OST1"
+}
+run_test 128 "Force using remote logs with --nolocallogs"
+
if ! combined_mgs_mds ; then
stop mgs
fi