1 Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux 2 3 Version 2.2.5 for Linux 2.2.14 4 Version 2.0.5 for Linux 2.0.38 5 6 PRODUCTION RELEASE 7 8 23 January 2000 9 10 Leonard N. Zubkoff 11 Dandelion Digital 12 lnz@dandelion.com 13 14 Copyright 1998-2000 by Leonard N. Zubkoff <lnz@dandelion.com> 15 16 17 INTRODUCTION 18 19Mylex, Inc. designs and manufactures a variety of high performance PCI RAID 20controllers. Mylex Corporation is located at 34551 Ardenwood Blvd., Fremont, 21California 94555, USA and can be reached at 510/796-6100 or on the World Wide 22Web at http://www.mylex.com. Mylex RAID Technical Support can be reached by 23electronic mail at support@mylex.com (for eXtremeRAID 1100 and older DAC960 24models) or techsup@mylex.com (for AcceleRAID models), by voice at 510/608-2400, 25or by FAX at 510/745-7715. Contact information for offices in Europe and Japan 26is available on the Web site. 27 28The latest information on Linux support for DAC960 PCI RAID Controllers, as 29well as the most recent release of this driver, will always be available from 30my Linux Home Page at URL "http://www.dandelion.com/Linux/". The Linux DAC960 31driver supports all current DAC960 PCI family controllers including the 32AcceleRAID models, as well as the eXtremeRAID 1100; see below for a complete 33list. For simplicity, in most places this documentation refers to DAC960 34generically rather than explicitly listing all the models. 35 36Bug reports should be sent via electronic mail to "lnz@dandelion.com". Please 37include with the bug report the complete configuration messages reported by the 38driver at startup, along with any subsequent system messages relevant to the 39controller's operation, and a detailed description of your system's hardware 40configuration. 41 42Please consult the DAC960 RAID controller documentation for detailed 43information regarding installation and configuration of the controllers. This 44document primarily provides information specific to the Linux DAC960 support. 45 46 47 DRIVER FEATURES 48 49The DAC960 RAID controllers are supported solely as high performance RAID 50controllers, not as interfaces to arbitrary SCSI devices. The Linux DAC960 51driver operates at the block device level, the same level as the SCSI and IDE 52drivers. Unlike other RAID controllers currently supported on Linux, the 53DAC960 driver is not dependent on the SCSI subsystem, and hence avoids all the 54complexity and unnecessary code that would be associated with an implementation 55as a SCSI driver. The DAC960 driver is designed for as high a performance as 56possible with no compromises or extra code for compatibility with lower 57performance devices. The DAC960 driver includes extensive error logging and 58online configuration management capabilities. Except for initial configuration 59of the controller and adding new disk drives, most everything can be handled 60from Linux while the system is operational. 61 62The DAC960 driver is architected to support up to 8 controllers per system. 63Each DAC960 controller can support up to 15 disk drives per channel, for a 64maximum of 45 drives on a three channel controller. The drives installed on a 65controller are divided into one or more "Drive Groups", and then each Drive 66Group is subdivided further into 1 to 32 "Logical Drives". Each Logical Drive 67has a specific RAID Level and caching policy associated with it, and it appears 68to Linux as a single block device. Logical Drives are further subdivided into 69up to 7 partitions through the normal Linux and PC disk partitioning schemes. 70Logical Drives are also known as "System Drives", and Drive Groups are also 71called "Packs". Both terms are in use in the Mylex documentation; I have 72chosen to standardize on the more generic "Logical Drive" and "Drive Group". 73 74DAC960 RAID disk devices are named in the style of the Device File System 75(DEVFS). The device corresponding to Logical Drive D on Controller C is 76referred to as /dev/rd/cCdD, and the partitions are called /dev/rd/cCdDp1 77through /dev/rd/cCdDp7. For example, partition 3 of Logical Drive 5 on 78Controller 2 is referred to as /dev/rd/c2d5p3. Note that unlike with SCSI 79disks the device names will not change in the event of a disk drive failure. 80The DAC960 driver is assigned major numbers 48 - 55 with one major number per 81controller. The 8 bits of minor number are divided into 5 bits for the Logical 82Drive and 3 bits for the partition. 83 84 85 SUPPORTED DAC960/DAC1100 PCI RAID CONTROLLERS 86 87The following list comprises the supported DAC960 and DAC1100 PCI RAID 88Controllers as of the date of this document. It is recommended that anyone 89purchasing a Mylex PCI RAID Controller not in the following table contact the 90author beforehand to verify that it is or will be supported. The eXtremeRAID 912000, eXtremeRAID 3000, and AcceleRAID 352 have an entirely new firmware 92interface and are not yet supported by this driver. 93 94eXtremeRAID 1100 (DAC1164P) 95 3 Wide Ultra-2/LVD SCSI channels 96 233MHz StrongARM SA 110 Processor 97 64 Bit PCI (backward compatible with 32 Bit PCI slots) 98 16MB/32MB/64MB Parity SDRAM Memory with Battery Backup 99 100AcceleRAID 250 (DAC960PTL1) 101 Uses onboard Symbios SCSI chips on certain motherboards 102 Also includes one onboard Wide Ultra-2/LVD SCSI Channel 103 66MHz Intel i960RD RISC Processor 104 4MB/8MB/16MB/32MB/64MB/128MB ECC EDO Memory 105 106AcceleRAID 200 (DAC960PTL0) 107 Uses onboard Symbios SCSI chips on certain motherboards 108 Includes no onboard SCSI Channels 109 66MHz Intel i960RD RISC Processor 110 4MB/8MB/16MB/32MB/64MB/128MB ECC EDO Memory 111 112AcceleRAID 150 (DAC960PRL) 113 Uses onboard Symbios SCSI chips on certain motherboards 114 Also includes one onboard Wide Ultra-2/LVD SCSI Channel 115 33MHz Intel i960RP RISC Processor 116 4MB Parity EDO Memory 117 118DAC960PJ 1/2/3 Wide Ultra SCSI-3 Channels 119 66MHz Intel i960RD RISC Processor 120 4MB/8MB/16MB/32MB/64MB/128MB ECC EDO Memory 121 122DAC960PG 1/2/3 Wide Ultra SCSI-3 Channels 123 33MHz Intel i960RP RISC Processor 124 4MB/8MB ECC EDO Memory 125 126DAC960PU 1/2/3 Wide Ultra SCSI-3 Channels 127 Intel i960CF RISC Processor 128 4MB/8MB EDRAM or 2MB/4MB/8MB/16MB/32MB DRAM Memory 129 130DAC960PD 1/2/3 Wide Fast SCSI-2 Channels 131 Intel i960CF RISC Processor 132 4MB/8MB EDRAM or 2MB/4MB/8MB/16MB/32MB DRAM Memory 133 134DAC960PL 1/2/3 Wide Fast SCSI-2 Channels 135 Intel i960 RISC Processor 136 2MB/4MB/8MB/16MB/32MB DRAM Memory 137 138For the eXtremeRAID 1100, firmware version 5.06-0-52 or above is required. 139 140For the AcceleRAID 250, 200, and 150, firmware version 4.06-0-57 or above is 141required. 142 143For the DAC960PJ and DAC960PG, firmware version 4.06-0-00 or above is required. 144 145For the DAC960PU, DAC960PD, and DAC960PL, firmware version 3.51-0-04 or above 146is required. 147 148Note that earlier revisions of the DAC960PU, DAC960PD, and DAC960PL controllers 149were delivered with version 2.xx firmware. Version 2.xx firmware is not 150supported by this driver and no support is envisioned. Contact Mylex RAID 151Technical Support to inquire about upgrading controllers with version 2.xx 152firmware to version 3.51-0-04. Upgrading to version 3.xx firmware requires 153installation of higher capacity Flash ROM chips, and not all DAC960PD and 154DAC960PL controllers can be upgraded. 155 156Please note that not all SCSI disk drives are suitable for use with DAC960 157controllers, and only particular firmware versions of any given model may 158actually function correctly. Similarly, not all motherboards have a BIOS that 159properly initializes the AcceleRAID 250, AcceleRAID 200, AcceleRAID 150, 160DAC960PJ, and DAC960PG because the Intel i960RD/RP is a multi-function device. 161If in doubt, contact Mylex RAID Technical Support (support@mylex.com) to verify 162compatibility. Mylex makes available a hard disk compatibility list by FTP at 163ftp://ftp.mylex.com/pub/dac960/diskcomp.html. 164 165 166 DRIVER INSTALLATION 167 168This distribution was prepared for Linux kernel version 2.2.14 or 2.0.38. 169 170To install the DAC960 RAID driver, you may use the following commands, 171replacing "/usr/src" with wherever you keep your Linux kernel source tree: 172 173 cd /usr/src 174 tar -xvzf DAC960-2.2.5.tar.gz (or DAC960-2.0.5.tar.gz) 175 mv README.DAC960 linux/Documentation 176 mv DAC960.[ch] linux/drivers/block 177 patch -p0 < DAC960.patch (driver 2.0.5 only) 178 cd linux 179 make config 180 make depend 181 make bzImage (or zImage) 182 183Then install "arch/i386/boot/bzImage" or "arch/i386/boot/zImage" as your 184standard kernel, run lilo if appropriate, and reboot. 185 186To create the necessary devices in /dev, the "make_rd" script included in 187"DAC960-Utilities.tar.gz" from http://www.dandelion.com/Linux/ may be used. 188LILO 21 and FDISK v2.9 include DAC960 support; also included in this archive 189are patches to LILO 20 and FDISK v2.8 that add DAC960 support, along with 190statically linked executables of LILO and FDISK. This modified version of LILO 191will allow booting from a DAC960 controller and/or mounting the root file 192system from a DAC960. 193 194Red Hat Linux 6.0 and SuSE Linux 6.1 include support for Mylex PCI RAID 195controllers. Installing directly onto a DAC960 may be problematic from other 196Linux distributions until their installation utilities are updated. 197 198 199 INSTALLATION NOTES 200 201Before installing Linux or adding DAC960 logical drives to an existing Linux 202system, the controller must first be configured to provide one or more logical 203drives using the BIOS Configuration Utility or DACCF. Please note that since 204there are only at most 6 usable partitions on each logical drive, systems 205requiring more partitions should subdivide a drive group into multiple logical 206drives, each of which can have up to 6 partitions. Also, note that with large 207disk arrays it is advisable to enable the 8GB BIOS Geometry (255/63) rather 208than accepting the default 2GB BIOS Geometry (128/32); failing to so do will 209cause the logical drive geometry to have more than 65535 cylinders which will 210make it impossible for FDISK to be used properly. The 8GB BIOS Geometry can be 211enabled by configuring the DAC960 BIOS, which is accessible via Alt-M during 212the BIOS initialization sequence. 213 214For maximum performance and the most efficient E2FSCK performance, it is 215recommended that EXT2 file systems be built with a 4KB block size and 16 block 216stride to match the DAC960 controller's 64KB default stripe size. The command 217"mke2fs -b 4096 -R stride=16 <device>" is appropriate. Unless there will be a 218large number of small files on the file systems, it is also beneficial to add 219the "-i 16384" option to increase the bytes per inode parameter thereby 220reducing the file system metadata. Finally, on systems that will only be run 221with Linux 2.2 or later kernels it is beneficial to enable sparse superblocks 222with the "-s 1" option. 223 224 225 DAC960 ANNOUNCEMENTS MAILING LIST 226 227The DAC960 Announcements Mailing List provides a forum for informing Linux 228users of new driver releases and other announcements regarding Linux support 229for DAC960 PCI RAID Controllers. To join the mailing list, send a message to 230"dac960-announce-request@dandelion.com" with the line "subscribe" in the 231message body. 232 233 234 CONTROLLER CONFIGURATION AND STATUS MONITORING 235 236The DAC960 RAID controllers running firmware 4.06 or above include a Background 237Initialization facility so that system downtime is minimized both for initial 238installation and subsequent configuration of additional storage. The BIOS 239Configuration Utility (accessible via Alt-R during the BIOS initialization 240sequence) is used to quickly configure the controller, and then the logical 241drives that have been created are available for immediate use even while they 242are still being initialized by the controller. The primary need for online 243configuration and status monitoring is then to avoid system downtime when disk 244drives fail and must be replaced. Mylex's online monitoring and configuration 245utilities are being ported to Linux and will become available at some point in 246the future. Note that with a SAF-TE (SCSI Accessed Fault-Tolerant Enclosure) 247enclosure, the controller is able to rebuild failed drives automatically as 248soon as a drive replacement is made available. 249 250The primary interfaces for controller configuration and status monitoring are 251special files created in the /proc/rd/... hierarchy along with the normal 252system console logging mechanism. Whenever the system is operating, the DAC960 253driver queries each controller for status information every 10 seconds, and 254checks for additional conditions every 60 seconds. The initial status of each 255controller is always available for controller N in /proc/rd/cN/initial_status, 256and the current status as of the last status monitoring query is available in 257/proc/rd/cN/current_status. In addition, status changes are also logged by the 258driver to the system console and will appear in the log files maintained by 259syslog. The progress of asynchronous rebuild or consistency check operations 260is also available in /proc/rd/cN/current_status, and progress messages are 261logged to the system console at most every 60 seconds. 262 263Starting with the 2.2.3/2.0.3 versions of the driver, the status information 264available in /proc/rd/cN/initial_status and /proc/rd/cN/current_status has been 265augmented to include the vendor, model, revision, and serial number (if 266available) for each physical device found connected to the controller: 267 268***** DAC960 RAID Driver Version 2.2.3 of 19 August 1999 ***** 269Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com> 270Configuring Mylex DAC960PRL PCI RAID Controller 271 Firmware Version: 4.07-0-07, Channels: 1, Memory Size: 16MB 272 PCI Bus: 1, Device: 4, Function: 1, I/O Address: Unassigned 273 PCI Address: 0xFE300000 mapped at 0xA0800000, IRQ Channel: 21 274 Controller Queue Depth: 128, Maximum Blocks per Command: 128 275 Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33 276 Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63 277 SAF-TE Enclosure Management Enabled 278 Physical Devices: 279 0:0 Vendor: IBM Model: DRVS09D Revision: 0270 280 Serial Number: 68016775HA 281 Disk Status: Online, 17928192 blocks 282 0:1 Vendor: IBM Model: DRVS09D Revision: 0270 283 Serial Number: 68004E53HA 284 Disk Status: Online, 17928192 blocks 285 0:2 Vendor: IBM Model: DRVS09D Revision: 0270 286 Serial Number: 13013935HA 287 Disk Status: Online, 17928192 blocks 288 0:3 Vendor: IBM Model: DRVS09D Revision: 0270 289 Serial Number: 13016897HA 290 Disk Status: Online, 17928192 blocks 291 0:4 Vendor: IBM Model: DRVS09D Revision: 0270 292 Serial Number: 68019905HA 293 Disk Status: Online, 17928192 blocks 294 0:5 Vendor: IBM Model: DRVS09D Revision: 0270 295 Serial Number: 68012753HA 296 Disk Status: Online, 17928192 blocks 297 0:6 Vendor: ESG-SHV Model: SCA HSBP M6 Revision: 0.61 298 Logical Drives: 299 /dev/rd/c0d0: RAID-5, Online, 89640960 blocks, Write Thru 300 No Rebuild or Consistency Check in Progress 301 302To simplify the monitoring process for custom software, the special file 303/proc/rd/status returns "OK" when all DAC960 controllers in the system are 304operating normally and no failures have occurred, or "ALERT" if any logical 305drives are offline or critical or any non-standby physical drives are dead. 306 307Configuration commands for controller N are available via the special file 308/proc/rd/cN/user_command. A human readable command can be written to this 309special file to initiate a configuration operation, and the results of the 310operation can then be read back from the special file in addition to being 311logged to the system console. The shell command sequence 312 313 echo "<configuration-command>" > /proc/rd/c0/user_command 314 cat /proc/rd/c0/user_command 315 316is typically used to execute configuration commands. The configuration 317commands are: 318 319 flush-cache 320 321 The "flush-cache" command flushes the controller's cache. The system 322 automatically flushes the cache at shutdown or if the driver module is 323 unloaded, so this command is only needed to be certain a write back cache 324 is flushed to disk before the system is powered off by a command to a UPS. 325 Note that the flush-cache command also stops an asynchronous rebuild or 326 consistency check, so it should not be used except when the system is being 327 halted. 328 329 kill <channel>:<target-id> 330 331 The "kill" command marks the physical drive <channel>:<target-id> as DEAD. 332 This command is provided primarily for testing, and should not be used 333 during normal system operation. 334 335 make-online <channel>:<target-id> 336 337 The "make-online" command changes the physical drive <channel>:<target-id> 338 from status DEAD to status ONLINE. In cases where multiple physical drives 339 have been killed simultaneously, this command may be used to bring them 340 back online, after which a consistency check is advisable. 341 342 Warning: make-online should only be used on a dead physical drive that is 343 an active part of a drive group, never on a standby drive. 344 345 make-standby <channel>:<target-id> 346 347 The "make-standby" command changes physical drive <channel>:<target-id> 348 from status DEAD to status STANDBY. It should only be used in cases where 349 a dead drive was replaced after an automatic rebuild was performed onto a 350 standby drive. It cannot be used to add a standby drive to the controller 351 configuration if one was not created initially; the BIOS Configuration 352 Utility must be used for that currently. 353 354 rebuild <channel>:<target-id> 355 356 The "rebuild" command initiates an asynchronous rebuild onto physical drive 357 <channel>:<target-id>. It should only be used when a dead drive has been 358 replaced. 359 360 check-consistency <logical-drive-number> 361 362 The "check-consistency" command initiates an asynchronous consistency check 363 of <logical-drive-number> with automatic restoration. It can be used 364 whenever it is desired to verify the consistency of the redundancy 365 information. 366 367 cancel-rebuild 368 cancel-consistency-check 369 370 The "cancel-rebuild" and "cancel-consistency-check" commands cancel any 371 rebuild or consistency check operations previously initiated. 372 373 374 EXAMPLE I - DRIVE FAILURE WITHOUT A STANDBY DRIVE 375 376The following annotated logs demonstrate the controller configuration and and 377online status monitoring capabilities of the Linux DAC960 Driver. The test 378configuration comprises 6 1GB Quantum Atlas I disk drives on two channels of a 379DAC960PJ controller. The physical drives are configured into a single drive 380group without a standby drive, and the drive group has been configured into two 381logical drives, one RAID-5 and one RAID-6. Note that these logs are from an 382earlier version of the driver and the messages have changed somewhat with newer 383releases, but the functionality remains similar. First, here is the current 384status of the RAID configuration: 385 386gwynedd:/u/lnz# cat /proc/rd/c0/current_status 387***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 ***** 388Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com> 389Configuring Mylex DAC960PJ PCI RAID Controller 390 Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB 391 PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned 392 PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9 393 Controller Queue Depth: 128, Maximum Blocks per Command: 128 394 Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33 395 Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63 396 Physical Devices: 397 0:1 - Disk: Online, 2201600 blocks 398 0:2 - Disk: Online, 2201600 blocks 399 0:3 - Disk: Online, 2201600 blocks 400 1:1 - Disk: Online, 2201600 blocks 401 1:2 - Disk: Online, 2201600 blocks 402 1:3 - Disk: Online, 2201600 blocks 403 Logical Drives: 404 /dev/rd/c0d0: RAID-5, Online, 5498880 blocks, Write Thru 405 /dev/rd/c0d1: RAID-6, Online, 3305472 blocks, Write Thru 406 No Rebuild or Consistency Check in Progress 407 408gwynedd:/u/lnz# cat /proc/rd/status 409OK 410 411The above messages indicate that everything is healthy, and /proc/rd/status 412returns "OK" indicating that there are no problems with any DAC960 controller 413in the system. For demonstration purposes, while I/O is active Physical Drive 4141:1 is now disconnected, simulating a drive failure. The failure is noted by 415the driver within 10 seconds of the controller's having detected it, and the 416driver logs the following console status messages indicating that Logical 417Drives 0 and 1 are now CRITICAL as a result of Physical Drive 1:1 being DEAD: 418 419DAC960#0: Physical Drive 1:2 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02 420DAC960#0: Physical Drive 1:3 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02 421DAC960#0: Physical Drive 1:1 killed because of timeout on SCSI command 422DAC960#0: Physical Drive 1:1 is now DEAD 423DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now CRITICAL 424DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now CRITICAL 425 426The Sense Keys logged here are just Check Condition / Unit Attention conditions 427arising from a SCSI bus reset that is forced by the controller during its error 428recovery procedures. Concurrently with the above, the driver status available 429from /proc/rd also reflects the drive failure. The status message in 430/proc/rd/status has changed from "OK" to "ALERT": 431 432gwynedd:/u/lnz# cat /proc/rd/status 433ALERT 434 435and /proc/rd/c0/current_status has been updated: 436 437gwynedd:/u/lnz# cat /proc/rd/c0/current_status 438 ... 439 Physical Devices: 440 0:1 - Disk: Online, 2201600 blocks 441 0:2 - Disk: Online, 2201600 blocks 442 0:3 - Disk: Online, 2201600 blocks 443 1:1 - Disk: Dead, 2201600 blocks 444 1:2 - Disk: Online, 2201600 blocks 445 1:3 - Disk: Online, 2201600 blocks 446 Logical Drives: 447 /dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru 448 /dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru 449 No Rebuild or Consistency Check in Progress 450 451Since there are no standby drives configured, the system can continue to access 452the logical drives in a performance degraded mode until the failed drive is 453replaced and a rebuild operation completed to restore the redundancy of the 454logical drives. Once Physical Drive 1:1 is replaced with a properly 455functioning drive, or if the physical drive was killed without having failed 456(e.g., due to electrical problems on the SCSI bus), the user can instruct the 457controller to initiate a rebuild operation onto the newly replaced drive: 458 459gwynedd:/u/lnz# echo "rebuild 1:1" > /proc/rd/c0/user_command 460gwynedd:/u/lnz# cat /proc/rd/c0/user_command 461Rebuild of Physical Drive 1:1 Initiated 462 463The echo command instructs the controller to initiate an asynchronous rebuild 464operation onto Physical Drive 1:1, and the status message that results from the 465operation is then available for reading from /proc/rd/c0/user_command, as well 466as being logged to the console by the driver. 467 468Within 10 seconds of this command the driver logs the initiation of the 469asynchronous rebuild operation: 470 471DAC960#0: Rebuild of Physical Drive 1:1 Initiated 472DAC960#0: Physical Drive 1:1 Error Log: Sense Key = 6, ASC = 29, ASCQ = 01 473DAC960#0: Physical Drive 1:1 is now WRITE-ONLY 474DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 1% completed 475 476and /proc/rd/c0/current_status is updated: 477 478gwynedd:/u/lnz# cat /proc/rd/c0/current_status 479 ... 480 Physical Devices: 481 0:1 - Disk: Online, 2201600 blocks 482 0:2 - Disk: Online, 2201600 blocks 483 0:3 - Disk: Online, 2201600 blocks 484 1:1 - Disk: Write-Only, 2201600 blocks 485 1:2 - Disk: Online, 2201600 blocks 486 1:3 - Disk: Online, 2201600 blocks 487 Logical Drives: 488 /dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru 489 /dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru 490 Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 6% completed 491 492As the rebuild progresses, the current status in /proc/rd/c0/current_status is 493updated every 10 seconds: 494 495gwynedd:/u/lnz# cat /proc/rd/c0/current_status 496 ... 497 Physical Devices: 498 0:1 - Disk: Online, 2201600 blocks 499 0:2 - Disk: Online, 2201600 blocks 500 0:3 - Disk: Online, 2201600 blocks 501 1:1 - Disk: Write-Only, 2201600 blocks 502 1:2 - Disk: Online, 2201600 blocks 503 1:3 - Disk: Online, 2201600 blocks 504 Logical Drives: 505 /dev/rd/c0d0: RAID-5, Critical, 5498880 blocks, Write Thru 506 /dev/rd/c0d1: RAID-6, Critical, 3305472 blocks, Write Thru 507 Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 15% completed 508 509and every minute a progress message is logged to the console by the driver: 510 511DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 32% completed 512DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 63% completed 513DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 94% completed 514DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 94% completed 515 516Finally, the rebuild completes successfully. The driver logs the status of the 517logical and physical drives and the rebuild completion: 518 519DAC960#0: Rebuild Completed Successfully 520DAC960#0: Physical Drive 1:1 is now ONLINE 521DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now ONLINE 522DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now ONLINE 523 524/proc/rd/c0/current_status is updated: 525 526gwynedd:/u/lnz# cat /proc/rd/c0/current_status 527 ... 528 Physical Devices: 529 0:1 - Disk: Online, 2201600 blocks 530 0:2 - Disk: Online, 2201600 blocks 531 0:3 - Disk: Online, 2201600 blocks 532 1:1 - Disk: Online, 2201600 blocks 533 1:2 - Disk: Online, 2201600 blocks 534 1:3 - Disk: Online, 2201600 blocks 535 Logical Drives: 536 /dev/rd/c0d0: RAID-5, Online, 5498880 blocks, Write Thru 537 /dev/rd/c0d1: RAID-6, Online, 3305472 blocks, Write Thru 538 Rebuild Completed Successfully 539 540and /proc/rd/status indicates that everything is healthy once again: 541 542gwynedd:/u/lnz# cat /proc/rd/status 543OK 544 545 546 EXAMPLE II - DRIVE FAILURE WITH A STANDBY DRIVE 547 548The following annotated logs demonstrate the controller configuration and and 549online status monitoring capabilities of the Linux DAC960 Driver. The test 550configuration comprises 6 1GB Quantum Atlas I disk drives on two channels of a 551DAC960PJ controller. The physical drives are configured into a single drive 552group with a standby drive, and the drive group has been configured into two 553logical drives, one RAID-5 and one RAID-6. Note that these logs are from an 554earlier version of the driver and the messages have changed somewhat with newer 555releases, but the functionality remains similar. First, here is the current 556status of the RAID configuration: 557 558gwynedd:/u/lnz# cat /proc/rd/c0/current_status 559***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 ***** 560Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com> 561Configuring Mylex DAC960PJ PCI RAID Controller 562 Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB 563 PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned 564 PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9 565 Controller Queue Depth: 128, Maximum Blocks per Command: 128 566 Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33 567 Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63 568 Physical Devices: 569 0:1 - Disk: Online, 2201600 blocks 570 0:2 - Disk: Online, 2201600 blocks 571 0:3 - Disk: Online, 2201600 blocks 572 1:1 - Disk: Online, 2201600 blocks 573 1:2 - Disk: Online, 2201600 blocks 574 1:3 - Disk: Standby, 2201600 blocks 575 Logical Drives: 576 /dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru 577 /dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru 578 No Rebuild or Consistency Check in Progress 579 580gwynedd:/u/lnz# cat /proc/rd/status 581OK 582 583The above messages indicate that everything is healthy, and /proc/rd/status 584returns "OK" indicating that there are no problems with any DAC960 controller 585in the system. For demonstration purposes, while I/O is active Physical Drive 5861:2 is now disconnected, simulating a drive failure. The failure is noted by 587the driver within 10 seconds of the controller's having detected it, and the 588driver logs the following console status messages: 589 590DAC960#0: Physical Drive 1:1 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02 591DAC960#0: Physical Drive 1:3 Error Log: Sense Key = 6, ASC = 29, ASCQ = 02 592DAC960#0: Physical Drive 1:2 killed because of timeout on SCSI command 593DAC960#0: Physical Drive 1:2 is now DEAD 594DAC960#0: Physical Drive 1:2 killed because it was removed 595DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now CRITICAL 596DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now CRITICAL 597 598Since a standby drive is configured, the controller automatically begins 599rebuilding onto the standby drive: 600 601DAC960#0: Physical Drive 1:3 is now WRITE-ONLY 602DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 4% completed 603 604Concurrently with the above, the driver status available from /proc/rd also 605reflects the drive failure and automatic rebuild. The status message in 606/proc/rd/status has changed from "OK" to "ALERT": 607 608gwynedd:/u/lnz# cat /proc/rd/status 609ALERT 610 611and /proc/rd/c0/current_status has been updated: 612 613gwynedd:/u/lnz# cat /proc/rd/c0/current_status 614 ... 615 Physical Devices: 616 0:1 - Disk: Online, 2201600 blocks 617 0:2 - Disk: Online, 2201600 blocks 618 0:3 - Disk: Online, 2201600 blocks 619 1:1 - Disk: Online, 2201600 blocks 620 1:2 - Disk: Dead, 2201600 blocks 621 1:3 - Disk: Write-Only, 2201600 blocks 622 Logical Drives: 623 /dev/rd/c0d0: RAID-5, Critical, 4399104 blocks, Write Thru 624 /dev/rd/c0d1: RAID-6, Critical, 2754560 blocks, Write Thru 625 Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 4% completed 626 627As the rebuild progresses, the current status in /proc/rd/c0/current_status is 628updated every 10 seconds: 629 630gwynedd:/u/lnz# cat /proc/rd/c0/current_status 631 ... 632 Physical Devices: 633 0:1 - Disk: Online, 2201600 blocks 634 0:2 - Disk: Online, 2201600 blocks 635 0:3 - Disk: Online, 2201600 blocks 636 1:1 - Disk: Online, 2201600 blocks 637 1:2 - Disk: Dead, 2201600 blocks 638 1:3 - Disk: Write-Only, 2201600 blocks 639 Logical Drives: 640 /dev/rd/c0d0: RAID-5, Critical, 4399104 blocks, Write Thru 641 /dev/rd/c0d1: RAID-6, Critical, 2754560 blocks, Write Thru 642 Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 40% completed 643 644and every minute a progress message is logged on the console by the driver: 645 646DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 40% completed 647DAC960#0: Rebuild in Progress: Logical Drive 0 (/dev/rd/c0d0) 76% completed 648DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 66% completed 649DAC960#0: Rebuild in Progress: Logical Drive 1 (/dev/rd/c0d1) 84% completed 650 651Finally, the rebuild completes successfully. The driver logs the status of the 652logical and physical drives and the rebuild completion: 653 654DAC960#0: Rebuild Completed Successfully 655DAC960#0: Physical Drive 1:3 is now ONLINE 656DAC960#0: Logical Drive 0 (/dev/rd/c0d0) is now ONLINE 657DAC960#0: Logical Drive 1 (/dev/rd/c0d1) is now ONLINE 658 659/proc/rd/c0/current_status is updated: 660 661***** DAC960 RAID Driver Version 2.0.0 of 23 March 1999 ***** 662Copyright 1998-1999 by Leonard N. Zubkoff <lnz@dandelion.com> 663Configuring Mylex DAC960PJ PCI RAID Controller 664 Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB 665 PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned 666 PCI Address: 0xFD4FC000 mapped at 0x8807000, IRQ Channel: 9 667 Controller Queue Depth: 128, Maximum Blocks per Command: 128 668 Driver Queue Depth: 127, Maximum Scatter/Gather Segments: 33 669 Stripe Size: 64KB, Segment Size: 8KB, BIOS Geometry: 255/63 670 Physical Devices: 671 0:1 - Disk: Online, 2201600 blocks 672 0:2 - Disk: Online, 2201600 blocks 673 0:3 - Disk: Online, 2201600 blocks 674 1:1 - Disk: Online, 2201600 blocks 675 1:2 - Disk: Dead, 2201600 blocks 676 1:3 - Disk: Online, 2201600 blocks 677 Logical Drives: 678 /dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru 679 /dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru 680 Rebuild Completed Successfully 681 682and /proc/rd/status indicates that everything is healthy once again: 683 684gwynedd:/u/lnz# cat /proc/rd/status 685OK 686 687Note that the absence of a viable standby drive does not create an "ALERT" 688status. Once dead Physical Drive 1:2 has been replaced, the controller must be 689told that this has occurred and that the newly replaced drive should become the 690new standby drive: 691 692gwynedd:/u/lnz# echo "make-standby 1:2" > /proc/rd/c0/user_command 693gwynedd:/u/lnz# cat /proc/rd/c0/user_command 694Make Standby of Physical Drive 1:2 Succeeded 695 696The echo command instructs the controller to make Physical Drive 1:2 into a 697standby drive, and the status message that results from the operation is then 698available for reading from /proc/rd/c0/user_command, as well as being logged to 699the console by the driver. Within 60 seconds of this command the driver logs: 700 701DAC960#0: Physical Drive 1:2 Error Log: Sense Key = 6, ASC = 29, ASCQ = 01 702DAC960#0: Physical Drive 1:2 is now STANDBY 703DAC960#0: Make Standby of Physical Drive 1:2 Succeeded 704 705and /proc/rd/c0/current_status is updated: 706 707gwynedd:/u/lnz# cat /proc/rd/c0/current_status 708 ... 709 Physical Devices: 710 0:1 - Disk: Online, 2201600 blocks 711 0:2 - Disk: Online, 2201600 blocks 712 0:3 - Disk: Online, 2201600 blocks 713 1:1 - Disk: Online, 2201600 blocks 714 1:2 - Disk: Standby, 2201600 blocks 715 1:3 - Disk: Online, 2201600 blocks 716 Logical Drives: 717 /dev/rd/c0d0: RAID-5, Online, 4399104 blocks, Write Thru 718 /dev/rd/c0d1: RAID-6, Online, 2754560 blocks, Write Thru 719 Rebuild Completed Successfully 720

