diff --git a/devicemapper/devmapper.go b/devicemapper/devmapper.go index abbd28b..136dd6b 100644 --- a/devicemapper/devmapper.go +++ b/devicemapper/devmapper.go @@ -750,7 +750,11 @@ func DeleteDevice(poolName string, deviceID int) error { return fmt.Errorf("Can't set message %s", err) } + dmSawBusy = false if err := task.run(); err != nil { + if dmSawBusy { + return ErrBusy + } return fmt.Errorf("Error running DeleteDevice %s", err) } return nil