Roadmap Suggestion: Tackle SAS drives next after 6.1
(posting on forums.grc.com as well as in newsgroups)
Summary:
@Steve ,my suggestion is to add SpinRite capabilities for SAS (Serial Attached SCSI) drives before moving on to other capabilities like USB or UEFI.
Rationale:
SAS drives are high performance drives used in enterprise-class storage, often in RAID arrays. I expect there would be a large market from enterprises for SpinRite in this space, as it builds upon SpinRite's known strengths in conventional magnetic recording (CMR) mechanical drives, and would (I think) take much less time to build than other proposed features. Additionally, the SCSI drive work needed for this could be reused as part of the USB feature addition.
Why address SAS prior to other planned features:
This work is in the traditional “sweet spot” of SpinRite, addressing a still-burgeoning market of mechanical drives. It would take less time than other planned work, would work in a FreeDOS environment, and add tremendous value for enterprises. Steve, I could see you having a separate “Enterprise” version of SpinRite (and charging more) for these capabilities if you wanted.
Quick Technical Background:
Drives:
SAS drives are high performance drives, with models on the market as CMR mechanical drives as well as SSD. Mechanical drives have rotational speeds of 7.2K RPM, 10K RPM, or 15K RPM, and when connected via the current SAS-3 spec, achieve throughput up to 12 Gbps; the mechanical drives are clearly higher performance than AHCI / SATA drives, and are unsurprisingly much more expensive.
Host-Based Adapters (HBA):
The HBA allows communications between the PCI bus and the drives. Unlike parallel SCSI, drives are not daisy-chained, but cables can be split and expanders can be attached to cables. Most HBAs allow for 4, 8, 16, or 24 direct-attached drives, and with the use of expanders, up to 1,024 drives can be attached to one HBA. HBAs allow for both internal and external connections to SAS drives. SAS allows for cable lengths of 10 meters vs 1 meter for SATA / 2 meters for eSATA.
HBAs come in two flavors:
- HBA with hardware RAID built-in, or
- HBA without hardware RAID (HBA in "IT" or "Initiator Target" mode).
In order to fully address the drive's capabilities, the driver would be written to work with an HBA in IT mode.
Most SAS HBA models have a BIOS and can be accessed under FreeDOS as well as UEFI. Unlike AHCI for native SATA, there is no industry standard for driver protocol to HBAs; different manufacturers use their own driver model, but I believe Steve could write a driver for just one vendor's family of cards; see next section for why.
Why only write a driver for one vendor's HBA cards?
SAS drives run in RAID arrays and are hot-swappable. Any suspect drive would be pulled from its RAID array and then connected to a standalone "SpinRite" PC to run repairs. That PC could have the specified vendor's card in it. After repair, the drive would be reinserted back into the RAID array.
LSI Logic (now Broadcom) has the lion's share of the market; in addition to their own branded cards, they make most of the OEM cards (Dell, HP, IBM), and they use an industry standard protocol called MPI (Message Passing Interface) for communications, so it would make sense to me to target this vendor's family of cards.
Work:
I believe there are 3 chunks of work:
- Write driver for the SAS Host Based Adapter. In addition to the vendor technical documentation, BSD-licensed driver source code in C is freely available and can be copied or studied for royalty-free use in closed-source commercial products like SpinRite.
- Add SATA drive capabilities. SAS HBAs work with both SATA and SAS drives, so this should be a port of the SATA driver work you’ve already done, using the SATA Tunneling Protocol (STP).
- Add SAS drive capabilities. This would translate your drive logic into SCSI commands, and be new work, using the Serial SCSI Protocol (SSP).
Code Reuse:
- As noted, the SATA drivers would hopefully be a port of the existing SATA work
- The SAS drive capabilities, using SCSI, are new. However, the USB has two protocols for communication to USB drives:
- USB Mass Storage Bulk-Only Transport (older), and
- USB Attached SCSI (introduced with USB 3 but usable with USB 2 devices)
The UAS work, when it comes to pass, would be able to leverage the SCSI work done for SAS drives.
Reasons not to do this:
This would not benefit home users, as very few home setups (even those with home NAS devices) use SAS drives. But I would think plenty of medium size and larger enterprises would be eager to have SpinRite capabilities for their on-premises storage systems.
Anyway, my 2 cents (or 200 cents, thanks for bearing with me!). Note I am not recommending this work for my own benefit, I'm semi-retired, but in thinking of what Spinrite 6.x and higher would be addressing, this seemed like a pretty big hole.
References:
Great background thread on history of Broadcom (LSI Logic) family of HBAs is here, along with MPI commands:
https://forums.servethehome.com/ind...d-raid-controller-technical-discussion.24119/
BSD-Licensed source code (freely usable or copyable in closed source programs):
https://github.com/freebsd/freebsd-src/tree/master/sys/dev/mps/mpi
Wikipedia SAS:
https://en.wikipedia.org/wiki/Serial_Attached_SCSI
Wikipedia USB Attached SCSI:
https://en.wikipedia.org/wiki/USB_Attached_SCSI
Broadcom main product page:
https://www.broadcom.com/products/storage/host-bus-adapters
SAS cable selection info (they are directional, so cable types matter!!)
https://www.servethehome.com/sas-sa...8088-8470-8482-8484-single-device-connectors/