HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

a
autochanger(7) autochanger(7)
is moved from the element specified by the
first_destination
field to the element specified by
the
second_destination
field. In an autochanger with multiple changer mechanisms, or a
media staging area, an exchange occurs if the
source and second_destination
fields are the
same.
DEPENDENCIES
To obtain access to disk surfaces within HP magneto-optical libraries, the ssrfc module must be specified in
the system configuration file. The ssrfc module depends on either the schgr driver, or the autox0 driver. If
ssrfc is to be included, then one or both of schgr or autox0 must also be included.
DEFAULT CONFIGURATIONS
By default,
ssrfc, schgr, and autox0
are not included in the system configuration
(
/stand/system
) file.
EXAMPLES
The following example uses the
SIOC_ELEMENT_ADDRESSES
and SIOC_ELEMENT_STATUS ioctl
functions to get bus address information about the drives in an HP magneto-optical autochanger:
int last_drive_el;
struct element_addresses el_addrs;
struct element_status el_stat;
/*
* Changer attached to card instance 1, with SCSI target id 5, lun 0.
*/
fd = open("/dev/rac/c1t5d0",O_RDWR);
if ((error = ioctl(fd, SIOC_ELEMENT_ADDRESSES, &el_addrs)) != 0) {
syserr("ioctl: SIOC_ELEMENT_ADDRESSES");
return -1;
} else {
last_drive_el = el_addrs.first_data_transfer
+ el_addrs.num_data_transfers - 1;
for (i = el_addrs.first_data_transfer; i <= last_drive_el; i++) {
el_stat.element = i;
if ((error = ioctl(fd, SIOC_ELEMENT_STATUS, &el_stat)) != 0) {
syserr("ioctl: SIOC_ELEMENT_ADDRESSES");
return -1;
} else {
/*
* You may wish to also check some of the other fields
* in the el_stat structure to verify that the data is
* valid. Fields: el_stat.access (ac accessible),
* el_stat.except (exception).
*/
if (! el_stat.not_bus && el_stat.id_valid) {
drive[i].addr = el_stat.bus_address;
if (! el_stat.lu_valid) {
drive[i].lun = 0;
} else {
drive[i].lun = el_stat.lun;
}
}
}
}
}
WARNINGS
Do not use LVM to configure multiple autochanger surfaces as one large file system. LVM was designed for
on-line volumes. In an autochanger, only the disks actually in the drives are on-line, while the disks stored
in their slots are off-line. If LVM is not carefully configured, thrashing of the autochanger disks result in
undesirable I/O performance. Plan carefully for best performance.
HP-UX 11i Version 2: December 2007 Update 6 Hewlett-Packard Company 25