SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Mandrake Other scsidev-1.5-3.i386.rpm

SCSIDEV

Section: Misc. Reference Manual Pages (25)
Updated: February 1996
Index 

NAME

scsidev - populate /dev/scsi with device names that are independent of reconfiguration. 

SYNOPSIS

scsidev[-f][-l][-m][-s][-v] 

DESCRIPTION

scsidevis a utility that is used to guarantee that the same device node can be usedfor the same scsi device, no matter what other scsi devices are added orremoved from the scsi chain. The need for this tool arose because devicenumbers are assigned dynamicly at boot time, and if a new disk were addedto the system (or if some disk didn't spin up), then fixed device nodes wouldcause the wrong filesystems to be mounted, checked, etc. This can also resultin security holes, as some device nodes may have permissions that allowgeneral users access to the raw device, and if the mappings were to change,users would be able to access different devices.

scsidevis designed to be used once each time the system boots. It will scan allof the detected devices on the system, and determine a immutable namethat will represent the device. It first checks to see if a node by this namealready exists - if this is the case, then it checks to see if the major/minornumbers are correct. If a change in the minor number is required, thena new device is created with the correct major/minor numbers, and in addition,any ownership and permissions for the old device are applied to the new device.

Once this process is complete, thenscsidevwill scan all of the entries in the /dev/scsi directory, and see ifany of them are for devices nodes which were added for devices thatare not active. These devices are modified to have a minor number of255 as a security precaution, since these might have permissions thatwould allow people to access devices that they should not be able toaccess. When it becomes possible for the kernel to rescan the busafter the system is booted, then you will have to rerun scsidevso that the device nodes for the newly detected devices areproperly updated.

The device nodes thatscsidevcreates look something like "sdh4-334c0i0l0p1". In this case,the various components of the name represent physical attributesabout the device or the host adapter to which it is connected.To begin with, the "h4" indicates that it is connected toan Adaptec 1542. The "-334" is a means of identifying which 1542the device is attached to (since linux supports more than one 1542 inthe system at the same time). The "c0" represents the channel number(since some host adapters can drive multiple scsi busses). The"i0l0" indicates that this device is scsi ID 0, with lun 0. Finallythe "p1" indicated partition number 1. 

OPTIONS

-f
Flush everything from /dev/scsi prior to scanning the devices detectedat boot time. All non-default ownership/permissions that may havebeen set will be lost.
-l
Symbolic link mode. Instead of creating nodes, symbolic links are createdwhich point to the older /dev/sda1 types of device nodes. The usageof this switch is not recommended.
-m mode
Specifies the mode for new entries that need to be created.
-s
Tells scsidev to print out the device serial numbers of all detecteddevices on the system. This string can be useful for forming aliases.
-v
Verbosity. Mainly used for debugging purposes. Use multiple times formore verbosity.
 

ALIASES

It was intended thatscsidevbe useful without any configuration at all. There are times when it ismuch more convenient to have symbolic names for various devices.These symbolic names should track devices as they get moved fromcontroller to another, or even if the SCSI id number is changed.

The general idea is that there is a configuration file/etc/scsi.aliaswhich lists the aliases thatscsidevwill attempt to create. Each line represents a separate alias,and consists of a series of tokens. Here are a couple of exampleentries:

serial_number="DX908FK", devtype=disk, alias=fourgigmanufacturer=WANGTEK, devtype=tape, alias=qictapeid=2, devtype=generic, alias=cdwriter
The minimum requirements are that each line have a alias and a devtypefield. The alias will be used to build the pathnames, and the devtypemust be one of disk, tape, cdrom or generic.

The additional qualifiers are optional, and you must specify asufficient number of them such that the alias will match only onedevice. The allowable qualifiers are:

manufacturer=
Specifies the name of the manufacturer. This is the same stringthat is printed at boot time, and is also available through /proc/scsi.
model=
Specifies the model number of the device. This is the same stringthat is printed at boot time, and is also available through /proc/scsi.
serial_number=
Specifies the serial number of the device. Not all devices implementthis, but for those that do it provides a convenient mechanism touniquely identify a device no matter where it is found on thescsi chain.
id=
Specifies the scsi id number for the device.
lun=
Specifies the lun for the device. Most devices have a lun of 0,and it is only special devices such as cd changers that implementmultiple lun devices.
chan=
Specifies which channel (i.e. which bus) for host adapters that drivemultiple channels.
partition=
Specifies the partition number for disk drives. If unspecified,the alias will match all partitions on the disk.
hostid=
Specifies the host adapter id number.
hostnum=
Specifies the unique number that each host adpater driver returns.Generally this number is always 0 except for cases where the driversupports more than one device of a given type on the system.

Note that the specifiers which take string arguments can be quotedif the string contains whitespace. 

AUTHOR

scsidevwas written by Eric Youngdale <ericAATTaib.com> 

BUGS

The only remaining issue that I know of is that booting will still beaffected by adding/removing devices. Since the device number wouldchange as devices are added/removed, it means that you would beattempting to boot the wrong disk. This can be worked around withlilo, of course, but a better solution is probably required. Weprobably do not have room to store additional information besides themajor/minor that we already use. It would be preferable if we couldmap these numbers to real physical devices in some way. 

AVAILABILITY

scsidevis available for anonymous ftp from tsx-11.mit.edu in/pub/linux/ALPHA/scsi and many other mirror sites. Technically it isnot ALPHA, nor is it BETA. This was just a convenient directory intowhich I could upload the utility.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ALIASES
AUTHOR
BUGS
AVAILABILITY

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector