Detach

If the device is not needed anymore it can be detached, returned to the OS and used by other applications. The detach operation is waiting while in-progress IO to the device drives is not completed, then removes the device drive's BDEV, then the DM restores OS device driver and return the device and its logical drives to the host OS. After detach the logical drives located on the device are no longer available to any RAID.

In some cases described in the “Important Notice on device driver management” section below, the device driver is not changed back to OS and stay in US state for some time.

To detach a device, use the command:
xnr_cli device-manager detach --ids device_id