Path: blob/master/Documentation/blockdev/cciss.txt
10821 views
This driver is for Compaq's SMART Array Controllers.12Supported Cards:3----------------45This driver is known to work with the following cards:67* SA 53008* SA 5i9* SA 53210* SA 531211* SA 64112* SA 64213* SA 640014* SA 6400 U320 Expansion Module15* SA 6i16* SA P60017* SA P80018* SA E40019* SA P400i20* SA E20021* SA E200i22* SA E50023* SA P700m24* SA P21225* SA P41026* SA P410i27* SA P41128* SA P81229* SA P712m30* SA P711m3132Detecting drive failures:33-------------------------3435To get the status of logical volumes and to detect physical drive36failures, you can use the cciss_vol_status program found here:37http://cciss.sourceforge.net/#cciss_utils3839Device Naming:40--------------4142If nodes are not already created in the /dev/cciss directory, run as root:4344# cd /dev45# ./MAKEDEV cciss4647You need some entries in /dev for the cciss device. The MAKEDEV script48can make device nodes for you automatically. Currently the device setup49is as follows:5051Major numbers:52104 cciss053105 cciss154106 cciss255105 cciss356108 cciss457109 cciss558110 cciss659111 cciss76061Minor numbers:62b7 b6 b5 b4 b3 b2 b1 b063|----+----| |----+----|64| |65| +-------- Partition ID (0=wholedev, 1-15 partition)66|67+-------------------- Logical Volume number6869The device naming scheme is:70/dev/cciss/c0d0 Controller 0, disk 0, whole device71/dev/cciss/c0d0p1 Controller 0, disk 0, partition 172/dev/cciss/c0d0p2 Controller 0, disk 0, partition 273/dev/cciss/c0d0p3 Controller 0, disk 0, partition 37475/dev/cciss/c1d1 Controller 1, disk 1, whole device76/dev/cciss/c1d1p1 Controller 1, disk 1, partition 177/dev/cciss/c1d1p2 Controller 1, disk 1, partition 278/dev/cciss/c1d1p3 Controller 1, disk 1, partition 37980SCSI tape drive and medium changer support81------------------------------------------8283SCSI sequential access devices and medium changer devices are supported and84appropriate device nodes are automatically created. (e.g.85/dev/st0, /dev/st1, etc. See the "st" man page for more details.)86You must enable "SCSI tape drive support for Smart Array 5xxx" and87"SCSI support" in your kernel configuration to be able to use SCSI88tape drives with your Smart Array 5xxx controller.8990Additionally, note that the driver will not engage the SCSI core at init91time. The driver must be directed to dynamically engage the SCSI core via92the /proc filesystem entry which the "block" side of the driver creates as93/proc/driver/cciss/cciss* at runtime. This is because at driver init time,94the SCSI core may not yet be initialized (because the driver is a block95driver) and attempting to register it with the SCSI core in such a case96would cause a hang. This is best done via an initialization script97(typically in /etc/init.d, but could vary depending on distribution).98For example:99100for x in /proc/driver/cciss/cciss[0-9]*101do102echo "engage scsi" > $x103done104105Once the SCSI core is engaged by the driver, it cannot be disengaged106(except by unloading the driver, if it happens to be linked as a module.)107108Note also that if no sequential access devices or medium changers are109detected, the SCSI core will not be engaged by the action of the above110script.111112Hot plug support for SCSI tape drives113-------------------------------------114115Hot plugging of SCSI tape drives is supported, with some caveats.116The cciss driver must be informed that changes to the SCSI bus117have been made. This may be done via the /proc filesystem.118For example:119120echo "rescan" > /proc/scsi/cciss0/1121122This causes the driver to query the adapter about changes to the123physical SCSI buses and/or fibre channel arbitrated loop and the124driver to make note of any new or removed sequential access devices125or medium changers. The driver will output messages indicating what126devices have been added or removed and the controller, bus, target and127lun used to address the device. It then notifies the SCSI mid layer128of these changes.129130Note that the naming convention of the /proc filesystem entries131contains a number in addition to the driver name. (E.g. "cciss0"132instead of just "cciss" which you might expect.)133134Note: ONLY sequential access devices and medium changers are presented135as SCSI devices to the SCSI mid layer by the cciss driver. Specifically,136physical SCSI disk drives are NOT presented to the SCSI mid layer. The137physical SCSI disk drives are controlled directly by the array controller138hardware and it is important to prevent the kernel from attempting to directly139access these devices too, as if the array controller were merely a SCSI140controller in the same way that we are allowing it to access SCSI tape drives.141142SCSI error handling for tape drives and medium changers143-------------------------------------------------------144145The linux SCSI mid layer provides an error handling protocol which146kicks into gear whenever a SCSI command fails to complete within a147certain amount of time (which can vary depending on the command).148The cciss driver participates in this protocol to some extent. The149normal protocol is a four step process. First the device is told150to abort the command. If that doesn't work, the device is reset.151If that doesn't work, the SCSI bus is reset. If that doesn't work152the host bus adapter is reset. Because the cciss driver is a block153driver as well as a SCSI driver and only the tape drives and medium154changers are presented to the SCSI mid layer, and unlike more155straightforward SCSI drivers, disk i/o continues through the block156side during the SCSI error recovery process, the cciss driver only157implements the first two of these actions, aborting the command, and158resetting the device. Additionally, most tape drives will not oblige159in aborting commands, and sometimes it appears they will not even160obey a reset command, though in most circumstances they will. In161the case that the command cannot be aborted and the device cannot be162reset, the device will be set offline.163164In the event the error handling code is triggered and a tape drive is165successfully reset or the tardy command is successfully aborted, the166tape drive may still not allow i/o to continue until some command167is issued which positions the tape to a known position. Typically you168must rewind the tape (by issuing "mt -f /dev/st0 rewind" for example)169before i/o can proceed again to a tape drive which was reset.170171There is a cciss_tape_cmds module parameter which can be used to make cciss172allocate more commands for use by tape drives. Ordinarily only a few commands173(6) are allocated for tape drives because tape drives are slow and174infrequently used and the primary purpose of Smart Array controllers is to175act as a RAID controller for disk drives, so the vast majority of commands176are allocated for disk devices. However, if you have more than a few tape177drives attached to a smart array, the default number of commands may not be178enought (for example, if you have 8 tape drives, you could only rewind 6179at one time with the default number of commands.) The cciss_tape_cmds module180parameter allows more commands (up to 16 more) to be allocated for use by181tape drives. For example:182183insmod cciss.ko cciss_tape_cmds=16184185Or, as a kernel boot parameter passed in via grub: cciss.cciss_tape_cmds=8186187188