Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mc(7) [osf1 man page]

mc(7)							 Miscellaneous Information Manual						     mc(7)

NAME
mc - SCSI medium changer interface DESCRIPTION
The medium changer (mc) interface provides a means for applications to control the robotic medium changers found in tape and optical libraries or jukeboxes. The mc driver may be used for any supported Small Computer System Interface (SCSI) medium changer devices, and potentially for other SCSI- compliant changer devices. Applications use Unix I/O calls (open, close, ioctl) to access changer devices, by means of device special files. Changer device special files are typically created in the /dev/changer directory by the dsfmgr utility on system startup. Refer to the dsfmgr(8) Reference Page and the System Administration Guide if you need to recreate device special files that are deleted acciden- tally. The rz(7) and tz(7) Reference Pages provide information on how device names map to SCSI CAM lun addresses. The format of a a medium changer device special file name is: /dev/changer/mcN where N is an integer representing the instance of the device that is assigned by dsfmgr at system startup. The driver supports a number of ioctl commands that move media in the library or return information about the media. See the header file /usr/sys/include/io/cam/mchanger.h for the ioctl commands and their associated structs. An application opens the device special file corresponding to the changer device, executes appropriate ioctl commands, then closes the device special file. Typically, changer devices are not shared between applications, but this is not due to any limitation on the changer or mc driver, but rather to the possibility of confusing which media belong to which application. An application on a non-cluster system can assure that only it can use a changer by opening that changer's device special file for exclusive access, by including the O_EXCL flag in the open call, and leaving the file open until the application is completely done using the changer. However, if the changer is on a shared bus in a cluster, it is possible for an application on each cluster member to open the device, even if each specifies O_EXCL, because that only grants exclusive access on the local host. In this case it may be useful for the application to use a SCSI device reser- vation to assure exclusive access. (An ioctl command is provided to facilitate reserving a changer.) Refer to the Software Product Description for a list of supported devices under the heading of SCSI CAM Layered Components. Facilities are provided in the operating system to allow the addition of some third-party SCSI-compliant medium changers. Under Digital Unix v4.0 and later, refer to the ddr_config(8) and ddr.dbase(4) reference pages for instructions. Under Digital Unix v3.x, new devices can be added to /sys/data/cam_data.c. See that file for instructions. FILES
changer device special file header file for changer ioctl commands RELATED INFORMATION
Commands: mcutil(1), mcicap(4), dsfmgr(8), scu(8), uerf(8) Interfaces: op(7), tz(7), SCSI(7) delim off mc(7)

Check Out this Related Man Page

CD(9)							   BSD Kernel Developer's Manual						     CD(9)

NAME
cd -- CDROM driver for the CAM SCSI subsystem DESCRIPTION
The cd device driver provides a read only interface for CDROM drives (SCSI type 5) and WORM drives (SCSI type 4) that support CDROM type com- mands. Some drives do not behave as the driver expects. See the QUIRKS section for information on possible flags. QUIRKS
Each CD-ROM device can have different interpretations of the SCSI spec. This can lead to drives requiring special handling in the driver. The following is a list of quirks that the driver recognize. CD_Q_NO_TOUCH This flag tell the driver not to probe the drive at attach time to see if there is a disk in the drive and find out what size it is. This flag is currently unimplemented in the CAM cd driver. CD_Q_BCD_TRACKS This flag is for broken drives that return the track numbers in packed BCD instead of straight decimal. If the drive seems to skip tracks (tracks 10-15 are skipped) then you have a drive that is in need of this flag. CD_Q_NO_CHANGER This flag tells the driver that the device in question is not a changer. This is only necessary for a CDROM device with multiple luns that are not a part of a changer. CD_Q_CHANGER This flag tells the driver that the given device is a multi-lun changer. In general, the driver will figure this out auto- matically when it sees a LUN greater than 0. Setting this flag only has the effect of telling the driver to run the initial read capacity command for LUN 0 of the changer through the changer scheduling code. CD_Q_10_BYTE_ONLY This flag tells the driver that the given device only accepts 10 byte MODE SENSE/MODE SELECT commands. In general these types of quirks should not be added to the cd(4) driver. The reason is that the driver does several things to attempt to determine whether the drive in question needs 10 byte commands. First, it issues a CAM Path Inquiry command to determine whether the protocol that the drive speaks typically only allows 10 byte commands. (ATAPI and USB are two prominent exam- ples of protocols where you generally only want to send 10 byte commands.) Then, if it gets an ILLEGAL REQUEST error back from a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10 byte version of the command instead. The only reason you would need a quirk is if your drive uses a protocol (e.g., SCSI) that typically does not have a problem with 6 byte commands. FILES
/sys/cam/scsi/scsi_cd.c is the driver source file. SEE ALSO
cd(4), scsi(4) HISTORY
The cd manual page first appeared in FreeBSD 2.2. AUTHORS
This manual page was written by John-Mark Gurney <gurney_j@efn.org>. It was updated for CAM and FreeBSD 3.0 by Kenneth Merry <ken@FreeBSD.org>. BSD
September 2, 2003 BSD
Man Page