Hardware RAID
- Most hardware RAID controllers don't speak SCSI at the driver level thus the driver is essentially a proxy between the SCSI midlayer and the HBA API
- This puts the onus on the driver writer to make a non-generic piece of hardware play nice inside a general purpose OS
- All RAID controllers hide the real disks from the operating system
- I/O transformations happen on the RAID controller
- The driver makes the RAID volume look just like a SCSI disk
ami0 at pci1 dev 8 function 0 "Symbios Logic MegaRAID" rev 0x01: apic 9 int 8 (irq 10)
ami0: Dell PERC4/DC, 64b/lhc, FW 351X, BIOS v1.10, 128MB RAM
ami0: 2 channels, 0 FC loops, 1 logical drives
scsibus2 at ami0: 40 targets
sd0 at scsibus2 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed
sd0: 346850MB, 512 bytes/sec, 710348800 sec total
scsibus3 at ami0: 16 targets
scsibus4 at ami0: 16 targets
safte0 at scsibus4 targ 6 lun 0: <SUPER, GEM318, 0> SCSI2 3/processor fixed
Virtual HBA
- The softraid idea was modeled after a hardware RAID controller
- Being like any other RAID controller it had to pretend to be a SCSI HBA
- Provide sensors information via sysctl
- Provide management capabilities via bioctl
- Why stop at RAID?
- It is generic enough to be a scaffold for just about anything SCSI
- Work on all architectures while being as MI as possible
softraid0 at root
scsibus3 at softraid0: 1 targets
sd2 at scsibus3 targ 0 lun 0: <OPENBSD, SR CRYPTO, 003> SCSI2 0/direct fixed
sd2: 3773MB, 512 bytes/sec, 7727123 sec total