scsimap(1)

NAME
scsimap - manage symbolic links for a persistent mapping of disk device nodes

SYNOPSIS
scsimap [ devicenames ]
scsiremap [ devicenames ]
scsi_serialno [ -v ]
scsi_serialno devicename

DESCRIPTION
scsimap prints out for each specified device node the minor number, ASCII inquiry data identifying the type of device, and a unique identifier. It is normally used to record a canonical mapping in /etc/scsimap.canonical. scsiremap (re)creates symbolic links mapping a set of device names to the currently active set of ordinary device nodes in accordance with a prerecorded canonical mapping of those device names to device unique identifiers. This prerecorded canonical mapping is expected in /etc/scsimap.canonical, normally created by scsimap. scsi_serialno prints out the minor device number and unique identifier for the specified device. It is used by scsimap and scsiremap.
scsiremap should be invoked from within a script run at system startup time. Typically this will be a script in the /etc/rc* directories. (See the man page for "init".) scsiremap should be invoked early enough in the boot process that any applications which need the device nodes it manages, (e.g. "mount") are run after it. Note, devices needed at boot time, particularly the root device and the device on which the scsimap programs reside, cannot be managed by scsiremap.

OPTIONS

-v  Causes scsi_serialno to print its version number and exit.

EXAMPLES
Initially, you must create a canonical mapping. This is most easily done by manually creating symbolic links for the desired device naming scheme, then using scsimap to record this mapping. For example, you could create the canonical names /dev/mydisk[1-7] mapping to various disk device nodes like so:
    ln -s /dev/cciss/c0d0p6 /dev/mydisk1
    ln -s /dev/cciss/c0d0p5 /dev/mydisk2
    ln -s /dev/cciss/c0d0p2 /dev/mydisk3
    ln -s /dev/cciss/c0d0p1 /dev/mydisk4
    ln -s /dev/sda2 /dev/mydisk5
    ln -s /dev/sda1 /dev/mydisk6
    ln -s /dev/sda3 /dev/mydisk7
Then, you can record this mapping with scsimap:
    scsimap /dev/mydisk* > /etc/scsimap.canonical

FILES

/etc/scsimap.canonical
    scsiremap uses this file to find the canonical mapping of device names to device unique identifiers. It uses this information to create symbolic links mapping canonical device names to actual device nodes which correspond to the physical devices which have matching unique identifiers.

/etc/scsimap.current
    scsiremap creates this file which contains the list of current actual device nodes and their corresponding minor numbers and unique identifiers. It uses this file in conjunction with /etc/scsimap.canonical to create new symbolic links.

SEE ALSO
mount(8) init(8)

BUGS
The SCSI inquiry serial number page, 0x80, is not really guaranteed to be unique, nor do all devices support it. Some effort is made by scsiremap to detect duplicate serial numbers appearing on devices thought to be distinct.
It is not possible to manage the root device or the device on which these utilities reside, or devices which are required too early in the boot process

AUTHOR
scsimap scsiremap and scsi_serialno were written by Stephen Cameron. of Compaq Computer Corporation scsi_serialno was inspired and based on code by Doug Gilbert in his sg_utils package.