A couple of other things that might help.
  • Check the state of @ERROR after the delete. If there is a reason why the drive cannot be deleted @ERROR may help identify what it is.
  • If the drive has a persistent mapping then it will not be deleted *unless* you include the /persistent flag - check the manual for details.