scsi.7 (2010 09)

s
scsi(7) scsi(7)
[EBUSY] This indicates the device is not ready for use or that the requested operation conflicts
with other operations (e.g., the device is currently open via another device driver or
exclusive access is in effect).
[EIO] Indicates a SCSI protocol or communication problem has occurred, or that a SCSI com-
mand resulted in a non-good status.
Manual entries that describe specific SCSI peripheral device drivers may provide additional qualification
of error results.
WARNINGS
Use of devices that are not officially supported can cause data loss, system panics and device damage.
HP-UX device drivers expect devices to be SCSI-2 compliant. Unsupported devices that are only SCSI-
CCS compliant may work but their use is discouraged. Use of unsupported devices that are only SCSI-1
compliant is strongly discouraged.
Changing SCSI bus connectivity (recabling) while the system is running is not supported. Switching SCSI
device power on or off while the device is connected to a system that does not support powerfail recovery
is not supported. These activities are known to cause data loss and system panics.
On systems that support the
scsi_ctl interface, the
SIOC_CMD_MODE, SIOC_SET_CMD, and
SIOC_RETURN_STATUS
ioctls are obsolete (see scsi_ctl (7)). Direct manipulation of SCSI devices via the
scsi_ctl interface provides a more functionally complete and easier-to-use means of low level SCSI
device control (see scsi_ctl (7)).
Drivers that support only devices which have no meaningful size may not support the
SIOC_CAPACITY
ioctl. Total device size in bytes may exceed 2
32
1 for some devices.
DEPENDENCIES
esdisk/estape/eschgr/sdisk/schgr/stape
The
SIOC_EXCLUSIVE ioctl may be used to obtain and release exclusive access. Exclusive access,
which prevents simultaneous access by other applications, is required for some operations and may be
desirable in other circumstances. The following exclusive access control arguments are supported. The
corresponding values are defined in
<sys/scsi.h> If the ioctl is issued on a persistent device file, tar-
get and bus exclusive access actually result to LUN exclusive access.
SIOC_REL_LUN_EXCL Release exclusive access to logical unit (LUN).
SIOC_SET_LUN_EXCL Gain exclusive access to logical unit (LUN).
SIOC_REL_TGT_EXCL Release exclusive access to associated SCSI target.
SIOC_SET_TGT_EXCL Gain exclusive access to associated SCSI target.
SIOC_REL_BUS_EXCL Release exclusive access to associated SCSI bus.
SIOC_SET_BUS_EXCL Gain exclusive access to associated SCSI bus.
The
SIOC_MEDIUM_CHANGED ioctl indicates when the media in a removable-media device may have
changed. A value of "1" indicates the device media may have changed since the last
SIOC_MEDIUM_CHANGED ioctl call. Note that only the first such call after a media change receives this
indication. This means that media changes are likely to be missed if multiple applications are attempting
to detect media changes. Exclusive access, obtained through use of the SIOC_EXCLUSIVE ioctl, can be
used to avoid this problem.
The following information is included from
<sys/scsi.h>:
#define SIOC_MEDIUM_CHANGED _IOR(’S’, 42, int)
#define SIOC_EXCLUSIVE _IOR(’S’, 68, int)
disc3
The SIOC_VPD_INQUIRY ioctl allows access to detailed device specific information. The page_code
field specifies which SCSI vital product data page is requested. The page_buf field is filled with the
requested page data. This ioctl when issued on a legacy device file only attempts to send the INQUIRY
command through the LUN path corresponding to the legacy device file even if multi-pathing is enabled
on legacy device files.
The following information is included from
<sys/scsi.h>:
#define SIOC_VPD_INQUIRY _IOWR(’S’, 10, struct vpd_inquiry)
8 Hewlett-Packard Company 8 HP-UX 11i Version 3: September 2010