· Atomic Racks
Using a SAS Drive in a Desktop or NAS: HBAs, Cables and 520-Byte Sector Reformatting
A SAS hard drive works in any desktop or NAS with a free PCIe slot: add an LSI host bus adapter in IT mode and a breakout cable, and if the drive came from a storage array, reformat its 520 or 528 byte sectors to 512 with sg_format. SAS drives will not connect to motherboard SATA ports.
Why SAS drives do not plug into SATA
SAS and SATA share a physical form factor and a power connector, and a SATA drive plugs into a SAS backplane. The reverse does not work. The SAS connector has a bridge between the data and power sections that physically blocks it from a SATA data cable, and the SATA host controller does not speak the SAS protocol. There is no adapter that makes a SAS drive work on a SATA port. You need a SAS controller.
The reward for that extra step is price. Used SAS drives are often cheaper per terabyte than SATA equivalents because fewer buyers can use them. The mechanical drive is the same; only the interface board differs. Our SAS vs SATA post covers the trade-offs.
Which HBA
The standard answer is an LSI-based host bus adapter flashed to IT (initiator-target) mode, which presents each drive to the OS directly with full SMART access. Avoid RAID-mode firmware for ZFS, Unraid or any software that wants to see raw disks.
| Card | Chipset | Link speed | Internal ports | Host interface |
|---|---|---|---|---|
| LSI SAS 9207-8i | SAS2308 | 6 Gb/s | 2x SFF-8087, 8 drives | PCIe 3.0 x8 |
| LSI SAS 9300-8i | SAS3008 | 12 Gb/s | 2x SFF-8643, 8 drives | PCIe 3.0 x8 |
| LSI SAS 9211-8i | SAS2008 | 6 Gb/s | 2x SFF-8087, 8 drives | PCIe 2.0 x8 |
For hard drives, 6 Gb/s versus 12 Gb/s does not matter; no single HDD approaches either. The 9207-8i is the value choice and is natively supported by Linux, FreeBSD, TrueNAS and Unraid. The 9300-8i is worth the extra cost if you will add SAS SSDs or a 12 Gb/s expander later. The 9211-8i works but its PCIe 2.0 link caps total throughput around 4 GB/s, which is still plenty for eight spinning drives. Expect these cards to run hot; they were designed for server airflow, and a small fan pointed at the heatsink is good practice in a desktop case.
Many used cards are rebranded OEM versions of the same chipsets (Dell PERC H310 and IBM M1015 for SAS2008, HP H220 for SAS2308) that flash to LSI IT firmware. Buying one already flashed saves an evening.
Cables
The HBA's internal ports are mini-SAS connectors. SFF-8087 is the older 6 Gb/s style; SFF-8643 is the newer 12 Gb/s style. Each port carries four lanes, so one port drives four drives. You need a forward breakout cable from the HBA connector to four drive connectors.
- Direct to drives: SFF-8087 or SFF-8643 to 4x SFF-8482. The SFF-8482 end is the SAS drive connector with a pass-through for a SATA power plug.
- To a SAS backplane: SFF-8087 or SFF-8643 to whatever the backplane uses, often the same connector.
- Not this: SFF-8087 to 4x SATA. That cable works for SATA drives on the HBA but the SATA data connector will not fit a SAS drive.
Buy forward breakout cables, not reverse. Reverse breakout goes from four motherboard SATA ports to one mini-SAS backplane connector, which is the opposite direction and will not work here.
520 and 528 byte sectors
Enterprise storage arrays from several vendors format their drives to 520 or 528 byte sectors. The extra 8 or 16 bytes per sector hold integrity metadata: either T10 Protection Information (an 8-byte guard, application and reference tag, giving 520) or a vendor checksum on top of it (528). When these drives are pulled and sold, they arrive still formatted that way. A Linux kernel will see the drive but refuse to use it, usually logging an unsupported sector size, and tools like fdisk will not partition it.
The fix is to reformat the drive with sg_format from the sg3_utils package, which issues a SCSI FORMAT UNIT command with a new block size. This destroys all data on the drive.
- Install sg3_utils and identify the drive:
lsscsi -glists each device with its sg node. - Confirm the current sector size:
sg_readcap --long /dev/sgXshows logical block length and whether protection information is enabled. - Reformat:
sg_format --format --size=512 /dev/sgX. Add--fmtpinfo=0to disable protection information at the same time. Use--size=4096instead if you want 4Kn and the drive supports it. - Wait. Progress can be polled with
sg_requestsor by running sg_format again; it reports percent complete. - Verify with
sg_readcap --longagain, then run a SMART extended self-test before trusting the drive.
How long it takes
A SCSI format writes every sector, so it takes roughly as long as a full sequential write of the drive. On a 14 TB drive at around 200 MB/s average, that is close to 20 hours. An 18 TB drive is longer. Some drives report progress; others sit silent until done. Do not interrupt it. A drive that loses power mid-format usually recovers by completing or restarting the format on next power-up, but you may have to issue the command again, and the total time starts over.
A small number of array-branded drives have firmware that refuses to change block size. If sg_format returns an error immediately rather than starting, check whether the drive is one of these before spending time on it.
T10 PI in brief
Protection Information is a standard that lets the drive and host exchange a checksum with each sector so that corruption anywhere in the path is detected end to end. It is valuable in arrays that use it and useless in a NAS that does not. Formatting to 512 bytes with PI disabled gives you a plain drive with the same capacity it was sold at; the extra bytes were never counted in the nominal capacity.
Using the drive afterward
Once at 512 or 4,096 byte sectors, a SAS drive behaves like any other disk. ZFS, Unraid, mdadm, Windows Storage Spaces and plain ext4 or NTFS all work. SMART data is available through smartctl with the same command as SATA; the output format differs because SAS uses log pages, which our SMART report guide explains. Browse SAS hard drives in stock; every one of ours has been reformatted to a standard sector size before listing.
FAQ
Can I use a SAS drive in a USB enclosure?
Almost never. Consumer USB bridges are SATA only. SAS to USB enclosures exist but are rare and expensive.
Will a SAS drive be louder or hotter than SATA?
The mechanical drive is identical. Some SAS firmware keeps the drive at a higher idle readiness state, which can add a watt. Noise is the same.
Can I boot from a SAS drive on an HBA?
Yes if the HBA's option ROM is enabled in BIOS or the board supports UEFI boot from the card. Many people disable the option ROM to speed boot and keep the OS on a separate drive.
Does the 520-byte reformat reduce capacity?
No. The nominal capacity (14 TB, 18 TB) refers to usable 512-byte data. The integrity bytes were extra.
What we do at Atomic Racks
Every used drive we sell gets a SMART extended self-test, a fio benchmark and NIST SP 800-88 sanitization with read-back verification, and SAS drives arriving at 520 or 528 bytes are reformatted to a standard sector size first. Hours are read from the drive and never reset, and each unit is priced into a power-on-hour tier. The QR tamper seal opens each unit's public test report. 90-day warranty on standard items, up to 2 years on certified tiers, 30-day returns and free shipping to the lower 48.
Further reading: 10K SAS 2.5-inch drives: still worth buying?.