Attach

To use a device’s drive(s) in xiRAID engine logic the device has to be attached first. The attach operation replaces the device drivers and exposes drives hosted by the device to the xiRAID engine. After attachment, the device is no longer managed by the host OS. The drives can be used in scope of new or previously configured RAID. The DM keeps devices configuration and all attached devices are re-attached automatically in case of xiRAID engine restart.

Drives of the attached device are configured as BDEV block devices. Technically any such BDEV can be used out of a RAID scope. For example, the BDEV can be exposed through vhost target. However, such configuration is not designed for production and is not persisted over the xiRAID engine restart.

To attach the device(s) use the command:

xnr_cli drive-manager attach --ids device_id,[device_id,...]

where device_id is an ID reported by xnr_cli drive-manager show

If a device is being used by another host OS application (for example, if it contains partitions mounted to the operating system) the attach command will fail and an appropriate message will be displayed. User can force the attachment of such device, but this can lead to data corruption caused by changing the driver on the device used by the other application:

xnr_cli drive-manager attach --force --ids device_id