SCIOLSTUNIT
This operation issues a start unit command to an device and is used to aid in device configuration.
rc = ioctl(adapter, SCIOLSTUNIT, &start_block);
where adapter is a file descriptor and start_block is a scsi_startunit structure as defined in the /usr/include/sys/scsi_buf.h header file. The FCP ID or iSCSI device's SCSI ID alias, and LUN should be placed in the scsi_startunit parameter block. The start_flag field designates the start option, which when set to true, makes the device available for use. When this field is set to false, the device is stopped.
The immed_flag field supports overlapping start operations to several devices on the adapter. When this field is set to false, status is returned only when the operation has completed. When this field is set to true, status is returned as soon as the device receives the command. The SCIOLTUR operation can then be issued to check on completion of the operation on a particular device.
Possible errno values are:
Item | Description |
---|---|
EIO | A system error has occurred. Consider retrying the operation several times, because another attempt might be successful. |
EFAULT | A user process copy has failed. |
EINVAL | The device is not opened. |
EACCES | The adapter is in diagnostics mode. |
ENOMEM | A memory request has failed. |
ETIMEDOUT | The command has timed out. Consider retrying the operation several times, because another attempt might be successful. |
ENODEV | The device is not responding. Possibly no LUNs exist on the present FCP ID. |
ENOCONNECT | A transport fault occurred. |
SCSI_VERSION_1
, which is defined in the /usr/include/sys/scsi_buf.h file.
In addition, the following fields can be set: - world_wide_name - The caller can set the world_wide_name field to the World Wide Name of the attached target device. If Dynamic Tracking of FC devices is enabled, the world_wide_name field must be set to ensure communication with the device because the scsi_id field of a device can change after dynamic tracking events.
- node_name - The caller can set the node_name field
to the Node Name of the attached target device. If the world_wide_name field
and the version field are set to
SCSI_VERSION_1
but the node_name field is not set, the scsi_id field is used for device lookup instead of the world_wide_name. If Dynamic Tracking of FC devices is enabled, the node_name field must be set to ensure communication with the device because the scsi_id field of a device can change after dynamic tracking events.
This operation requires SCIOLSTART to be run first.
If the FCP SCIOLSTUNIT ioctl operation completes successfully, then the adap_set_flags field might have the SC_RET_ID flag set. This field is set only if the world_wide_name and node_ name fields were provided in the ioctl call and the FC adapter driver detects that the scsi_id field of this device has changed. The scsi_id field contains the new scsi_id value.