Getting the Marvell 88SE9215 controller to work (mini guide)

This is mainly an informational post about how I got the Marvell 88SE9215 SATA/RAID controller to work with my TrueNAS SCALE setup to work.

System Information:
System: TrueNAS SCALE
Version: ElectricEel-24.10.0.2
Kernel Version: 6.6.44-production+truenas
SATA Controller Chipset: Marvell 88SE9215
PCIe ID: 1b4b:9215
Vendor name / Marketing name: Dawicontrol DC-614e RAID

# lspci -nnkk
02:00.0 RAID bus controller [0104]: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller [1b4b:9215] (rev 01)
        Subsystem: Dawicontrol GmbH 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller [dc93:614e]
        Kernel driver in use: ahci

Background:
This chipset seems to be well supported by the Linux kernel, however, judging from the ahci.c source code in the kernel, Marvell chips seem to not be automatically attached to the AHCI driver due to some concerns around PATA drives.
The controller needs to be manually attached to the AHCI driver via the sysfs interface.

GUIDE:

  1. During UEFI: The controller may show some configuration screen directly after powering on the device (even before you get a change to enter the UEFI). Just ignore it. You do not need to configure anything here.

  2. Install TrueNAS as usual on a different drive NOT connected to this controller (e.g. NVMe drive, SATA drive on a different controller)

  3. Open the TrueNAS WebUI

  4. Navigate to System → Advanced Settings

  5. In the card titled “Init/Shutdown Scripts” press the “Add” button

  6. A warning might appear - just close it. You know what you are doing, right?

  7. Fill the fields as follows:
    Description: Enable Marvell controller
    Type: Command
    Command: /bin/echo “1b4b 9215” > /sys/module/ahci/drivers/pci:ahci/new_id
    When: Pre Init
    Enabled: Yes
    Timeout: 10

  8. Reboot your system

  9. The drives connected to the controller should now work.

  10. Eat pizza, think about unicorns and try to not think about your next battle with hardware

For reference, things I tried which did not work:
I also tried to enable the drives via the kernel cmdline configured in the following way:
midclt call system.advanced.update '{"kernel_extra_options": "ahci.marvell_enable=1"}'
However this didn’t do anything useful.

Credits:
Notable other forum entries which guided me to the right direction (and honestly did most of the work):

https://debianforum.de/forum/viewtopic.php?t=185534
https://www.linuxforen.de/forums/showthread.php?274363-Marvell-RAID-wird-nicht-erkannt
https://www.linuxforen.de/forums/showthread.php?274366-Raid-Controller-DC-624e-Platten-werden-nicht-erkannt
1 Like

Small correction:

Use /bin/echo 1b4b 9215 > /sys/module/ahci/drivers/pci:ahci/new_id && sleep 5 && systemctl restart ix-zfs.service

  • The double quotes around the ID was troublesome
  • Sleeping just for good measure (might not be needed)
  • Restart ix-zfs.service. This seems to re-enumerate the disks/ZFS pool.