diff --git a/userspace/marsadm b/userspace/marsadm index 057a8914..c9f12f2c 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -3941,6 +3941,13 @@ sub primary_phase0 { lprint "all preconditions OK for resource '$res'\n"; } +# only for primary --force: wait until fetch has actually stopped +sub primary_phase0a { + my ($cmd, $res) = @_; + return unless $force; + wait_cond($cmd, $res, "is-fetch-off"); +} + # only for systemd: wait that primary device is no longer open sub primary_phase0b { my ($cmd, $res) = @_; @@ -6762,6 +6769,8 @@ my %cmd_table = \&primary_phase0, "check preconditions", "FORK", + \&primary_phase0a, + "conditionally wait for fetch off", \&primary_phase0b, "wait for systemd", \&primary_phase1,