code: func (util *RBDUtil) DetachBlockDisk(disk rbdDiskUnmapper, mapPath string) error {
  
  	if pathExists, pathErr := mount.PathExists(mapPath); pathErr != nil {
  		return fmt.Errorf("Error checking if path exists: %v", pathErr)
  	} else if !pathExists {
  		klog.Warningf("Warning: Unmap skipped because path does not exist: %v", mapPath)
  		return nil
  	}
  	// If we arrive here, device is no longer used, see if we need to logout of the target
  	device, err := getBlockVolumeDevice(mapPath)
  	if err != nil {
  		return err
  	}
  
  	if len(device) == 0 {
  		return fmt.Errorf("DetachDisk failed , device is empty")
  	}
  
  	exec := disk.plugin.host.GetExec(disk.plugin.GetPluginName())
  
  	var rbdCmd string
  
  	// Unlike map, we cannot fallthrough here.
  	// Any nbd device must be unmapped by rbd-nbd
  	if strings.HasPrefix(device, "/dev/nbd") {
  		rbdCmd = "rbd-nbd"
  		klog.V(4).Infof("rbd: using rbd-nbd for unmap function")
  	} else {
  		rbdCmd = "rbd"
  		klog.V(4).Infof("rbd: using rbd for unmap function")
  	}
  
  	// 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: %s", device, err, string(output)))
  	}
  	klog.V(3).Infof("rbd: successfully unmap device %s", device)
  
  	return nil
  }
docs: // DetachBlockDisk detaches the disk from the node.