# Known good, affordable 2-4 port SATA PCIe card?



## spork (Feb 18, 2021)

I have a somewhat older HP server for home use (HP ML10 v2), and the built-in SATA is mostly fine, but you can only boot off of certain ports, and there's no BIOS option to select which port to boot off of (known issue on an otherwise nice/cheap/IP-KVM-equipped server).

I currently have a generic 2-port SATA PCIe card in there with an ASMedia ASM1062 chipset. It's always been a little weird, even with just a single boot ssd hanging off it. When I added a second with gmirror, it really just went nuts with parity errors. Multiple drives, multiple brand new SATA cables...

So is there anything under $50 that's known to work well with FreeBSD and isn't from the "enterprise" side of things? I'd prefer new stock, but if there's some stellar card I can pick up used on ebay, I'm fine with that as well.


----------



## diizzy (Feb 18, 2021)

One using ASM1166 ?


----------



## tuaris (Feb 18, 2021)

The ASMedia chips have always caused me trouble on FreeBSD and I would stay away from them until those issue get resolved:








						Other - Kernel: ahcich: Timeout in slot
					

If I'm on IDE and I see no errors (which I have not for the past 2 days) how could the cables be harriewarrie?  Well, for one thing, AHCI and IDE operates at different speeds. So if you cables are slightly out of spec, they might work in IDE mode, but fail in AHCI mode. But the second point is...




					forums.freebsd.org
				








						201194 – Kernel: ahcich: Timeout in slot
					






					bugs.freebsd.org
				




I currently use FreeBSD on a desktop with some Marvell 92xx/91xx based cards, but not enough for me to say if it's reliable or not.

I've had nothing but great experiences with Areca PCI-X and PCIe adapters.  I usually buy used ones from eBay and often times you can find some of the older ones way under $50.


----------



## diizzy (Feb 18, 2021)

It makes no sense buying essentially deprecated hardware, LSI SAS-2008 (these are getting old by now) or newer have better support but if you're not going to use the built in RAID functionality you might as well go for a plain AHCI controller instead.


----------



## diizzy (Feb 18, 2021)

tuaris said:


> The ASMedia chips have always caused me trouble on FreeBSD and I would stay away from them until those issue get resolved:
> 
> 
> 
> ...


First link involves numerous controllers (Intel and AMD aswell as ASMedia) so I think you can safely disregard that as a data point
The second seems to have a wonky card, I have a few cards and then perform as good as any other AHCI controller (Intel, AMD) not to mention that they're very common on motherboards since a few years back. Be sure to run the latest firmware available and quality of dirt cheap noname chinese PCIe cards can be so-so.


----------



## spork (Feb 18, 2021)

diizzy said:


> One using ASM1166 ?


I'm not sure I want to go to another ASMedia card after this...

I do have a really old server (about to be retired) in a colo with a PCI-X Areca raid card, and boy is that thing just the most low-hassle, just works RAID controller I ever played around with.

At this point though, I'm totally done with any hardware RAID, don't want to touch it ever again.


----------



## Crivens (Feb 18, 2021)

I have two Rocket Raid cards in my file server. They are supported and drive 8 of the discs inside.


----------



## diizzy (Feb 19, 2021)

Crivens said:


> I have two Rocket Raid cards in my file server. They are supported and drive 8 of the discs inside.


Most are propreitary (non standard) and support was dropped "a while" ago


			HEADS UP - users of hpt27xx, hptmv, hptnr, hptrr drivers
		


AHCI or LSI/Broadcom (2008 series or newer, you'll also need suitable cabling not just regular SATA cables going that route) is your best bet...

JMicron JMB585 might also be an option although I do personally think that ASMedia are superior. This controller is also used in the ARM64 Helios64 NAS as an example.


			https://www.amazon.com/CREST-Internal-Non-Raid-Controller-Bracket/dp/B07ST9CPND


----------



## Crivens (Feb 19, 2021)

diizzy said:


> Most are propreitary (non standard) and support was dropped "a while" ago
> 
> 
> HEADS UP - users of hpt27xx, hptmv, hptnr, hptrr drivers


Aw crud. I did not update that box in some time. I'll need to check the chipset before I update it. Thanks for the warning.


----------



## spork (Feb 19, 2021)

diizzy said:


> JMicron JMB585 might also be an option although I do personally think that ASMedia are superior.


The card that's giving me issues right now is an ASMedia, so I'm kind of hesitant. I realized I didn't post info on it, this is relevant dmesg output:


```
ahci0: <ASMedia ASM1062 AHCI SATA controller> port 0x4000-0x4007,0x4008-0x400b,0x4010-0x4017,0x4018-0x401b,0x4020-0x403f mem 0xfbff0000-0xfbff01ff irq 18 at device 0.0 on pci6
ahci0: AHCI v1.20 with 2 6Gbps ports, Port Multiplier supported
ahci0: quirks=0xc00000<NOCCS,NOAUX>
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0

# lspci -v -s 0d:00.0
0d:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) (prog-if 01 [AHCI 1.0])
    Subsystem: ASMedia Technology Inc. Device 1060
    Flags: bus master, fast devsel, latency 0, IRQ 18
    I/O ports at 4000
    I/O ports at 4008
    I/O ports at 4010
    I/O ports at 4018
    I/O ports at 4020
    Memory at fbff0000 (32-bit, non-prefetchable)
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [78] Power Management version 3
    Capabilities: [80] Express Legacy Endpoint, MSI 00
    Capabilities: [100] Virtual Channel
```


----------



## spork (Feb 20, 2021)

Any thoughts on this card?









						LSI SAS 9212-4i 6Gb SAS Controller Card Internal 629913-002  | eBay
					

Find many great new & used options and get the best deals for LSI SAS 9212-4i 6Gb SAS Controller Card Internal 629913-002 at the best online prices at eBay! Free shipping for many products!



					www.ebay.com
				




It's apparently supported by mps(4) and isn't much older than the server it's going in...


----------



## spork (Feb 22, 2021)

So I bought the one above, should arrive late this week.

Also found I have a bunch of these cables, which will hopefully work as a breakout cable.


----------



## SirDice (Feb 22, 2021)

spork said:


> It's apparently supported by mps(4)


That should work fine (slightly different model):

```
root@molly:~ # mpsutil show adapter
mps0 Adapter:
       Board Name: SAS9207-8i
   Board Assembly: H3-25412-00K
        Chip Name: LSISAS2308
    Chip Revision: ALL
    BIOS Revision: 7.39.00.00
Firmware Revision: 20.00.02.00
  Integrated RAID: no

PhyNum  CtlrHandle  DevHandle  Disabled  Speed   Min    Max    Device
0       0001        0009       N         6.0     1.5    6.0    SAS Initiator
1       0002        000a       N         6.0     1.5    6.0    SAS Initiator
2       0004        000c       N         6.0     1.5    6.0    SAS Initiator
3       0003        000b       N         6.0     1.5    6.0    SAS Initiator
4       0005        000d       N         6.0     1.5    6.0    SAS Initiator
5       0006        000e       N         6.0     1.5    6.0    SAS Initiator
6       0007        000f       N         6.0     1.5    6.0    SAS Initiator
7                              N                 1.5    6.0    SAS Initiator
root@molly:~ # uname -a
FreeBSD molly.dicelan.home 13.0-STABLE FreeBSD 13.0-STABLE #18 stable/13-n244584-d69677407ef: Sat Feb 20 20:01:21 CET 2021     root@molly.dicelan.home:/usr/obj/usr/src/amd64.amd64/sys/MOLLY  amd64
```


----------



## spork (Jun 11, 2021)

Thought I'd close this one out. I ended up with an LSI 9212-4i (seen here: https://www.ebay.com/itm/203458074773?ViewItem=&item=203458074773)

Nice card in that it has single SAS ports, so no breakout card needed. All drives and cables I've tried on there work fine, all the timeouts and everything just went away.

The flashing process is a genuine PITA if you don't have the right hardware around though - mine came with the IR firmware. Finding the firmware isn't too hard, but the current iteration apparently really wants a UEFI shell and that was not an option for me. In the process I also trashed a Dell-branded LSI in an old server I was using for the flash process (thankfully that card was also only $20).

Here's the info under 12.2.

dmesg and lspci:


```
mps0: <Avago Technologies (LSI) SAS2008> port 0x5000-0x50ff mem 0xfbff0000-0xfbff3fff,0xfbf80000-0xfbfbffff irq 17 at device 0.0 on pci2
mps0: Firmware: 20.00.07.00, Driver: 21.02.00.00-fbsd
mps0: IOCCapabilities: 1285c<ScsiTaskFull,DiagTrace,SnapBuf,EEDP,TransRetry,EventReplay,HostDisc>

[root@media /home/spork]# lspci -v -s 07:00.0
07:00.0 Serial Attached SCSI controller: Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
    Subsystem: Broadcom / LSI Device 3060
    Flags: bus master, fast devsel, latency 0, IRQ 17
    I/O ports at 5000
    Memory at fbff0000 (64-bit, non-prefetchable)
    Memory at fbf80000 (64-bit, non-prefetchable)
    Capabilities: [50] Power Management version 3
    Capabilities: [68] Express Endpoint, MSI 00
    Capabilities: [d0] Vital Product Data
    Capabilities: [a8] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [c0] MSI-X: Enable+ Count=15 Masked-
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [138] Power Budgeting <?>
    Capabilities: [150] Single Root I/O Virtualization (SR-IOV)
    Capabilities: [190] Alternative Routing-ID Interpretation (ARI)
```


```
[root@media /home/spork]# mpsutil show adapter
mps0 Adapter:
       Board Name: SAS9212-4i4e
   Board Assembly:
        Chip Name: LSISAS2008
    Chip Revision: ALL
    BIOS Revision: 7.39.02.00
Firmware Revision: 20.00.07.00
  Integrated RAID: no

PhyNum  CtlrHandle  DevHandle  Disabled  Speed   Min    Max    Device
0                              N                 1.5    6.0    SAS Initiator
1                              N                 1.5    6.0    SAS Initiator
2                              N                 1.5    6.0    SAS Initiator
3                              N                 1.5    6.0    SAS Initiator
4       0001        0009       N         6.0     1.5    6.0    SAS Initiator
5                              N                 1.5    6.0    SAS Initiator
6                              N                 1.5    6.0    SAS Initiator
7                              N                 1.5    6.0    SAS Initiator
```

Funny thing is I have a workstation where some SSDs I'm testing in an eSATA port are acting weird in the same way. That has an Intel controller:


```
ahci0: <Intel Ibex Peak AHCI SATA controller> port 0xf900-0xf907,0xf800-0xf803,0xf700-0xf707,0xf600-0xf603,0xf500-0xf51f mem 0xfbffc000-0xfbffc7ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.30 with 6 3Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich4: <AHCI channel> at channel 4 on ahci0
ahcich5: <AHCI channel> at channel 5 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
```

I feel like there's just a bunch of older SATA controllers that have not had enough eyes on them - probably weird quirks that just aren't dealt with on the FreeBSD side of things.


----------



## Phishfry (Jun 11, 2021)

I am glad you took my advice from long ago. SAS9212 is a worthy card even three years later.








						Solved - Cheap/supported SATA card
					

That's about the size of it - PCIe 2.0 or 3.0, full height.  Should support booting.  I have an HP ML10 and I've used up all the onboard ports and need a few more...  currently booting off an SSD jammed in a SATA to USB enclosure.




					forums.freebsd.org
				











						Recommendations for a motherboard
					

I was hoping to build my own file server a few years ago and got as far buying a case and a power supply, but then other things got in the way. The case is a Fractal Designs Node 304 Mini-ITX box and am currently thinking about which motherboard to buy for it. The box will basically just run as...




					forums.freebsd.org
				



Mine is going on 7 years of usage.


----------

