URL
https://opencores.org/ocsvn/test_project/test_project/trunk
Subversion Repositories test_project
[/] [test_project/] [trunk/] [linux_sd_driver/] [Documentation/] [cciss.txt] - Rev 62
Compare with Previous | Blame | View Log
This driver is for Compaq's SMART Array Controllers.Supported Cards:----------------This driver is known to work with the following cards:* SA 5300* SA 5i* SA 532* SA 5312* SA 641* SA 642* SA 6400* SA 6400 U320 Expansion Module* SA 6i* SA P600* SA P800* SA E400* SA P400i* SA E200* SA E200i* SA E500Detecting drive failures:-------------------------To get the status of logical volumes and to detect physical drivefailures, you can use the cciss_vol_status program found here:http://cciss.sourceforge.net/#cciss_utilsDevice Naming:--------------If nodes are not already created in the /dev/cciss directory, run as root:# cd /dev# ./MAKEDEV ccissYou need some entries in /dev for the cciss device. The MAKEDEV scriptcan make device nodes for you automatically. Currently the device setupis as follows:Major numbers:104 cciss0105 cciss1106 cciss2105 cciss3108 cciss4109 cciss5110 cciss6111 cciss7Minor numbers:b7 b6 b5 b4 b3 b2 b1 b0|----+----| |----+----|| || +-------- Partition ID (0=wholedev, 1-15 partition)|+-------------------- Logical Volume numberThe device naming scheme is:/dev/cciss/c0d0 Controller 0, disk 0, whole device/dev/cciss/c0d0p1 Controller 0, disk 0, partition 1/dev/cciss/c0d0p2 Controller 0, disk 0, partition 2/dev/cciss/c0d0p3 Controller 0, disk 0, partition 3/dev/cciss/c1d1 Controller 1, disk 1, whole device/dev/cciss/c1d1p1 Controller 1, disk 1, partition 1/dev/cciss/c1d1p2 Controller 1, disk 1, partition 2/dev/cciss/c1d1p3 Controller 1, disk 1, partition 3SCSI tape drive and medium changer support------------------------------------------SCSI sequential access devices and medium changer devices are supported andappropriate device nodes are automatically created. (e.g./dev/st0, /dev/st1, etc. See the "st" man page for more details.)You must enable "SCSI tape drive support for Smart Array 5xxx" and"SCSI support" in your kernel configuration to be able to use SCSItape drives with your Smart Array 5xxx controller.Additionally, note that the driver will not engage the SCSI core at inittime. The driver must be directed to dynamically engage the SCSI core viathe /proc filesystem entry which the "block" side of the driver creates as/proc/driver/cciss/cciss* at runtime. This is because at driver init time,the SCSI core may not yet be initialized (because the driver is a blockdriver) and attempting to register it with the SCSI core in such a casewould cause a hang. This is best done via an initialization script(typically in /etc/init.d, but could vary depending on distribution).For example:for x in /proc/driver/cciss/cciss[0-9]*doecho "engage scsi" > $xdoneOnce the SCSI core is engaged by the driver, it cannot be disengaged(except by unloading the driver, if it happens to be linked as a module.)Note also that if no sequential access devices or medium changers aredetected, the SCSI core will not be engaged by the action of the abovescript.Hot plug support for SCSI tape drives-------------------------------------Hot plugging of SCSI tape drives is supported, with some caveats.The cciss driver must be informed that changes to the SCSI bushave been made, in addition to and prior to informing the SCSImid layer. This may be done via the /proc filesystem. For example:echo "rescan" > /proc/scsi/cciss0/1This causes the adapter to query the adapter about changes to thephysical SCSI buses and/or fibre channel arbitrated loop and thedriver to make note of any new or removed sequential access devicesor medium changers. The driver will output messages indicating whatdevices have been added or removed and the controller, bus, target andlun used to address the device. Once this is done, the SCSI mid layercan be informed of changes to the virtual SCSI bus which the driverpresents to it in the usual way. For example:echo scsi add-single-device 3 2 1 0 > /proc/scsi/scsito add a device on controller 3, bus 2, target 1, lun 0. Note thatthe driver makes an effort to preserve the devices positionsin the virtual SCSI bus, so if you are only moving tape drivesaround on the same adapter and not adding or removing tape drivesfrom the adapter, informing the SCSI mid layer may not be necessary.Note that the naming convention of the /proc filesystem entriescontains a number in addition to the driver name. (E.g. "cciss0"instead of just "cciss" which you might expect.)Note: ONLY sequential access devices and medium changers are presentedas SCSI devices to the SCSI mid layer by the cciss driver. Specifically,physical SCSI disk drives are NOT presented to the SCSI mid layer. Thephysical SCSI disk drives are controlled directly by the array controllerhardware and it is important to prevent the kernel from attempting to directlyaccess these devices too, as if the array controller were merely a SCSIcontroller in the same way that we are allowing it to access SCSI tape drives.SCSI error handling for tape drives and medium changers-------------------------------------------------------The linux SCSI mid layer provides an error handling protocol whichkicks into gear whenever a SCSI command fails to complete within acertain amount of time (which can vary depending on the command).The cciss driver participates in this protocol to some extent. Thenormal protocol is a four step process. First the device is toldto abort the command. If that doesn't work, the device is reset.If that doesn't work, the SCSI bus is reset. If that doesn't workthe host bus adapter is reset. Because the cciss driver is a blockdriver as well as a SCSI driver and only the tape drives and mediumchangers are presented to the SCSI mid layer, and unlike morestraightforward SCSI drivers, disk i/o continues through the blockside during the SCSI error recovery process, the cciss driver onlyimplements the first two of these actions, aborting the command, andresetting the device. Additionally, most tape drives will not obligein aborting commands, and sometimes it appears they will not evenobey a reset command, though in most circumstances they will. Inthe case that the command cannot be aborted and the device cannot bereset, the device will be set offline.In the event the error handling code is triggered and a tape drive issuccessfully reset or the tardy command is successfully aborted, thetape drive may still not allow i/o to continue until some commandis issued which positions the tape to a known position. Typically youmust rewind the tape (by issuing "mt -f /dev/st0 rewind" for example)before i/o can proceed again to a tape drive which was reset.
