Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mc(7) [osf1 man page]

mc(7)							 Miscellaneous Information Manual						     mc(7)

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

scsieject(1)						      General Commands Manual						      scsieject(1)

scsieject - control SCSI tape devices SYNOPSIS
scsieject [-f <scsi-generic-device>] commands DESCRIPTION
The scsieject command controls SCSI devices in a platform-independent manner. As long as 'mtx' works on the platform, so does 'scsieject'. OPTIONS
The first argument, given following -f , is the SCSI generic device corresponding to your tape drive. Consult your operating system's doc- umentation for more information (for example, under Linux these are generally /dev/sg0 through /dev/sg15, under FreeBSD these are /dev/pass0 through /dev/passX. Under Solaris this is usually the same as your tape drive (Solaris has a SCSI passthrough ioctl). You can set the STAPE or TAPE environment variable rather than use -f. COMMANDS
load Load the medium into the drive. When this command is issued to a CD/DVD drive and the tray is extended the tray will be retracted if the drive is capable of it. unload Unload the medium from the drive (also known as eject). When this command is issued to a CD/DVD drive or a tape drive the media will be ejected if the device supports it. start Start the device. Some devices require a start command after a media changer has loaded new media into the device. stop Stop the device. Some devices require a stop command prior to unloading the medium from the device when using a media changer. lock Lock the device. Locks the device so that the medium cannot be removed manually. unlock Unlock the device. Unlocks the device so that the medium can be removed manually. AUTHORS
This program was written by Robert Nelson <> based on the scsitape program written by Eric Lee Green <>. Major portions of the 'mtxl.c' library used herein were written by Leonard Zubkoff. HINTS
Under Linux, cat /proc/scsi/scsi will tell you what SCSI devices you have. You can then refer to them as /dev/sga, /dev/sgb, etc. by the order they are reported. Under FreeBSD, camcontrol devlist will tell you what SCSI devices you have, along with which pass device controls them. Under Solaris 7 and 8, /usr/sbin/devfsadm -C will clean up your /devices directory. Then find /devices -name 'st@*' -print will return a list of all tape drives. /dev on Solaris is apparently only of historical interest. BUGS AND LIMITATIONS
There are no known bugs or limitations. AVAILABILITY
This version of scsieject is currently being maintained by Robert Nelson <> as part of the 'mtx' suite of programs. The 'mtx' home page is and the actual code is currently available there and via SVN from SEE ALSO
loaderinfo(1),tapeinfo(1),mtx(1) scsieject1.0 scsieject(1)
Man Page