HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
a
autochanger(7) autochanger(7)
Surface Surface Descriptor
changer device 0
1a 01
1b 02
2a 03
2b ... 04 ...
31b 3e
32a 3f
32b .... 40 ....
All fields in the device number are specified in hexadecimal notation. Note that there is no support for
hard partitions (sections) in this minor number. If desired, partitioning can be achieved via LVM soft-
partitioning schemes.
The major numbers used by the changer drivers are:
b_major c_major
schgr 29 231
autox0 30 230
Following are long listings showing the major and minor numbers associated with the device special file
names of the first surface and the changer:
schgr:
brw-rw-rw- 1 root sys 29 0x015001 Apr 22 10:22 /dev/ac/c1t5d0_1a
crw-rw-rw- 1 root sys 231 0x015001 Apr 22 10:22 /dev/rac/c1t5d0_1a
crw-rw-rw- 1 root sys 231 0x015000 Apr 22 10:22 /dev/rac/c1t5d0
autox0:
brw-rw-rw- 1 root sys 30 0x015001 Apr 24 11:35 /dev/ac/c1t5d0_1a
crw-rw-rw- 1 root sys 230 0x015001 Apr 24 11:35 /dev/rac/c1t5d0_1a
crw-rw-rw- 1 root sys 230 0x015000 Apr 24 11:35 /dev/rac/c1t5d0
MAGNETO-OPTICAL AUTOCHANGER SURFACE DEVICE ACCESS
To access disk surfaces within HP magneto-optical libraries, it is necessary to include the entry for the sur-
face module, ssrfc, in the system configuration file /stand/system
, as well as an entry for the
appropriate SCSI changer driver,
schgr or autox0, depending on architecture. The
ssrfc module
enables accessing a magneto-optical disk surface much like a disk device. The disk is moved into an idle
drive by the changer, then the requested disk I/O operation is performed. Upon completion of the request,
the disk is returned to its storage location within the autochanger.
The surface module allows concurrent access to as many disks as there are drives in the autochanger pro-
duct. Requests for I/O on additional disks within the autochanger are blocked awaiting an available drive
resource.
By default, some commands (such as
mount, newfs, and mediainit ) open the device with the
O_NDELAY flag set. Invocations of these commands on an autochanger surface do not wait for a drive
resource to become available. Instead, these requests return with [EBUSY] if no drive is available.
Developers using the surface module functionality to access autochanger disks can invoke the open system
call with the O_NDELAY flag to achieve this same "non-blocking" behavior:
error = open("/dev/rac/c1t5d0_1a",O_RDWR | O_NDELAY);
If it is acceptable to block waiting for an available drive resource, the O_NDELAY flag is unnecessary.
Here is a sample script to access multiple disk surfaces in an autochanger that has 2 drives, minimizing
blocking:
dd if=/dev/rdsk/c0t0d0 of=/dev/rac/c1t5d0_1a bs=64k &
dd if=/dev/rdsk/c0t1d0 of=/dev/rac/c1t5d0_2a bs=64k &
wait
dd if=/dev/rdsk/c0t2d0 of=/dev/rac/c1t5d0_1b bs=64k &
dd if=/dev/rdsk/c0t3d0 of=/dev/rac/c1t5d0_2b bs=64k &
wait
...
HP-UX 11i Version 2: December 2007 Update − 2 − Hewlett-Packard Company 21