I thought I would write up my notes of using a cheap PCIE card to add extra disks to my Open Media Vault setup. I have had a few problems with this type of disk controller but could not categorically prove it was at fault. Maybe other people who are using a similar controller might find these notes helpful. I have found I can use two disks but if I try to add more I get I/O errors even on the two disks that work fine when the later disk were not added.
The controller I picked was this quite cheap one:

BEYIMEI PCIE SATA Card 8 Port, 6 Gbit/s SATA 3.0 PCI-E Card 4X
Chipset: ASMedia ASM1166
From an OMV / Debian / Linux perspective we must be using it through this SATA controller
root@omv23:~# lspci | grep ASM
01:00.0 SATA controller: ASMedia Technology Inc. Device 1166 (rev 02)
04:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
Verbose mode
01:00.0 SATA controller: ASMedia Technology Inc. Device 1166 (rev 02) (prog-if 01 [AHCI 1.0])
Subsystem: ZyDAS Technology Corp. Device 2116
Flags: bus master, fast devsel, latency 0, IRQ 31
Memory at f7e82000 (32-bit, non-prefetchable) [size=8K]
Memory at f7e80000 (32-bit, non-prefetchable) [size=8K]
Expansion ROM at f7e00000 [disabled] [size=512K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [80] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [130] Secondary PCI Express
Kernel driver in use: ahci
Kernel modules: ahci
Display More
My Open Media Vault version is up to date:
root@omv23:~# dpkg -l | grep openmediavault
ii openmediavault 6.3.2-2 all openmediavault - The open network attached storage solution
ii openmediavault-kernel 6.4.5 all kernel package
ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
ii openmediavault-omvextrasorg 6.1.1 all OMV-Extras.org Package Repositories for OpenMediaVault
ii openmediavault-zfs 6.0.12 amd64 OpenMediaVault plugin for ZFS
The original two disks I added look like this
lsblk -o NAME,MODEL,SERIAL,WWN,HCTL,MOUNTPOINT,SIZE,FSTYPE,UUID,PARTUUID
sdh TOSHIBA_HDWE160 10GAK1QDFB8G 0x50000399cbb81261 36:0:0:0 5.5T
├─sdh1 0x50000399cbb81261 5.5T zfs_member 17579695501947784507 de287461-af87-2849-a0d6-1cd58c90a959
└─sdh9 0x50000399cbb81261 8M 0547f32f-48e5-4345-896f-b1a3b733724d
sdi TOSHIBA_HDWE160 10GXK1B6FB8G 0x50000399cc700b52 37:0:0:0 5.5T
├─sdi1 0x50000399cc700b52 5.5T zfs_member 17579695501947784507 6d50b91d-825a-1647-84dd-23005db0caaf
└─sdi9 0x50000399cc700b52 8M d0671e81-7697-7247-9fd1-84cad7c99b9b
The additional fours disk I was trying to add are very old: three SAMSUNG SpinPoint F1 DT, one SAMSUNG SpinPoint F3.
sdd SAMSUNG_HD103UJ S13PJDWS228239 0x50000f0000fe02b9 10:0:0:0 931.5G
sde SAMSUNG_HD103UJ S13PJDWS228237 0x50000f0000fe02ab 11:0:0:0 931.5G
sdf SAMSUNG_HD103SJ S246JDWZ525473 0x50024e900392fa0f 34:0:0:0 931.5G
sdg SAMSUNG_HD103UJ S13PJDWS228229 0x50000f0000fe026b 35:0:0:0 931.5G
I tested with the two Toshiba drives for weeks with no issues at all. When I add the four old Samsung disks (they were unformatted from a QNAP NAS which were working perfectly fine) we see within a few minutes the IO errors. These IO errors are seen on the Toshiba drive which made me think this is a Controller issue.
There are many errors but to summarize they look like this
[Sun Feb 26 17:41:22 2023] ata36.00: exception Emask 0x0 SAct 0x10 SErr 0x0 action 0x6 frozen
[Sun Feb 26 17:41:22 2023] ata36.00: failed command: READ FPDMA QUEUED
[Sun Feb 26 17:41:22 2023] ata36.00: cmd 60/08:20:a8:6d:70/00:00:74:00:00/40 tag 4 ncq dma 4096 in
res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
un Feb 26 17:41:22 2023] ata36.00: status: { DRDY }
[Sun Feb 26 17:41:22 2023] ata36: hard resetting link
[Sun Feb 26 17:41:28 2023] ata36: link is slow to respond, please be patient (ready=0)
[Sun Feb 26 17:41:32 2023] ata36: COMRESET failed (errno=-16)
[Sun Feb 26 17:42:36 2023] sd 35:0:0:0: [sdg] tag#4 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=104s
[Sun Feb 26 17:42:36 2023] I/O error, dev sdg, sector 1953525160 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[Sun Feb 26 17:42:36 2023] Buffer I/O error on dev sdg, logical block 244190645, async page read
[Sun Feb 26 17:42:53 2023] I/O error, dev sdf, sector 1953524992 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[Sun Feb 26 17:43:00 2023] ata37.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Display More
I restarted the machine with just the four Samsung disks attached and they were fine on reboot. The sd d,e,f,g labels are now rearranged
lsblk -o NAME,MODEL,SERIAL,WWN,HCTL,MOUNTPOINT,SIZE,FSTYPE,UUID,PARTUUID
...
sdd SAMSUNG_HD103UJ S13PJDWS228239 0x50000f0000fe02b9 10:0:0:0 931.5G
sde SAMSUNG_HD103UJ S13PJDWS228237 0x50000f0000fe02ab 11:0:0:0 931.5G
sdf SAMSUNG_HD103SJ S246JDWZ525473 0x50024e900392fa0f 34:0:0:0 931.5G
sdg SAMSUNG_HD103UJ S13PJDWS228229 0x50000f0000fe026b 35:0:0:0 931.5G
and they did not detect any problems in their smart reports. NB That these SAMSUNG SpinPoint disks make an almost comic "Whoooop" sound on startup and have a fair bit of clicking - but I understand for these disks this is normal and they have always done this.
At some point we do get IO errors reported and smartctl reports the following for all but the sdd disk on 10.0.0.0 where that's the HCTL: Host:Channel:Target:Lun identifier.
root@omv23:~# smartctl --device=ata -H /dev/sdf
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.1.10-1-pve] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
Read Device Identity failed: Input/output error
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
I bought brand new SATA leads and re-seated all power leads and was able to once again run long smart tests with no issue. After many hours I added the Toshiba disks and once again I got within ten minutes IO errors.
I've read reports that some people think PCIE SATA cards are not a good idea
They state they
- can have buggy firmware
- have issues with more than two SATA ports
but I could find no backing for this in any other sources.
They recommend instead: Serial Attached SCSI (SAS) Host Bus Adapter (HBA). I could not find many examples of these for sale.
For the time being I'm using my motherboard's four SATA ports and two on the PCIE controller. Everything is working well. As my Samsung drives are very old I think I will just give up on them but I'm quite confident they are fine.