code: func (util *RBDUtil) DetachDisk(plugin *rbdPlugin, deviceMountPath string, device string) error {
  	if len(device) == 0 {
  		return fmt.Errorf("DetachDisk failed , device is empty")
  	}
  
  	exec := plugin.host.GetExec(plugin.GetPluginName())
  
  	var rbdCmd string
  
  	// Unlike map, we cannot fallthrough for unmap
  	// the tool to unmap is based on device type
  	if strings.HasPrefix(device, "/dev/nbd") {
  		rbdCmd = "rbd-nbd"
  	} else {
  		rbdCmd = "rbd"
  	}
  
  	// rbd unmap
  	output, err := exec.Run(rbdCmd, "unmap", device)
  	if err != nil {
  		return rbdErrors(err, fmt.Errorf("rbd: failed to unmap device %s, error %v, rbd output: %v", device, err, output))
  	}
  	klog.V(3).Infof("rbd: successfully unmap device %s", device)
  
  	// Currently, we don't persist rbd info on the disk, but for backward
  	// compatbility, we need to clean it if found.
  	rbdFile := filepath.Join(deviceMountPath, "rbd.json")
  	exists, err := utilpath.Exists(utilpath.CheckFollowSymlink, rbdFile)
  	if err != nil {
  		return err
  	}
  	if exists {
  		klog.V(3).Infof("rbd: old rbd.json is found under %s, cleaning it", deviceMountPath)
  		err = util.cleanOldRBDFile(plugin, rbdFile)
  		if err != nil {
  			klog.Errorf("rbd: failed to clean %s", rbdFile)
  			return err
  		}
  		klog.V(3).Infof("rbd: successfully remove %s", rbdFile)
  	}
  	return nil
  }
docs: // DetachDisk detaches the disk from the node.
  // It detaches device from the node if device is provided, and removes the lock
  // if there is persisted RBD info under deviceMountPath.