diff --git a/userspace/marsadm b/userspace/marsadm index 679bee53..81ca4510 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -2100,9 +2100,11 @@ sub attach_res_phase2 { return if $force; check_status($cmd, $res, "is-attached", $detach ? 0 : 1, 1); if ($detach) { + system("sync"); check_mars_device($cmd, $res, 1, 1); check_status($cmd, $res, "is-replaying", 0, 1); check_status($cmd, $res, "is-syncing", 0, 1); + system("sync"); } }