The DAIO (Diskomizer Asynchronous IO) USCSI module uses the raw uscsi(7I) interface provided to issue IOs. This has a number of effects:
It avoids disksort in the disk driver.
Any of the more esoteric bits in the SCSI packet can be set.
Unlabelled devices can be tested.
Labels can be completely overwritten.
The DAIO_USCSI module is used by setting the option AIO_ROUTINES to be USCSI. It can only be used on devices that support the uscsi(7I) interface. The user running Diskomizer has to have enough privileges to both open the device and issue the USCSI commands. Traditionally this means running as root.
Due to the limitations of the sd(7D) and ssd(7D) drivers prior to SunOS 5.9 using the DAIO_USCSI module on those releases is not recommended. The drivers prior to SunOS 5.9 would only allow one uscsi(7I) command per device at a time.
The DAIO_USCSI module uses the same threading model as the DAIO_PREAD module to give the appearance of asynchronous IO.
Options
DAIO_USCSI_USE_PWRITE Instead of using USCSI to do the writes just use the pwrite(2) system call.
The following options are only valid if DAIO_USCSI_USE_PWRITE is false, they all set various bits in the SCSI packet:
DAIO_USCSI_WRITE_VERIFY
DAIO_USCSI_WRITE_VERIFY_BYTE_CHECK
DAIO_USCSI_WRITE_FORCE_UNIT_ACCESS
DAIO_USCSI_WRITE_DISABLE_PAGE_OUT
DAIO_USCSI_WRITE_TIMEOUT.MAX
DAIO_USCSI_WRITE_TIMEOUT.MIN
DAIO_USCSI_USE_PREAD Instead of using USCSI to do the reads just use the pread(2) system call.
The following options are only valid if DAIO_USCSI_USE_PREAD is false they all set various bits in the SCSI packet:
DAIO_USCSI_READ_FORCE_UNIT_ACCESS
DAIO_USCSI_READ_DISABLE_PAGE_OUT
DAIO_USCSI_READ_TIMEOUT.MAX
DAIO_USCSI_READ_TIMEOUT.MIN
DAIO_USCSI_ALLOW_BAD_VTOC If set then use the SCSI READ CAPACITY command to determine the capacity of the device and then fake up a VTOC that contains a single slice of the whole drive. The device has to have been opened with the O_NDELAY flag so that the disk driver will allow the unlabelled drive to be opened.
The following option is only valid if both DAIO_USCSI_USE_PREAD and DAIO_USCSI_USE_PWRITE are false.
DAIO_USCSI_IGNORE_PARTITIONS It causes diskomizer to not read the disk label at all and to act against all the available sectors on the disk. It can be used to wipe labels of all kinds.