How to build TrueNAS Scale with own kernel patch

Hi all,
I have 4 NVMe that are recognized by the BIOS but not by the kernel.
I have tried various distributions but the result is always the same:

“Duplicate cntlid 1 with nvme0 , subsys nqn.2018-05.com.example:nvme:nvm-subsystem-ODAHUA 20210499, rejecting”

I found a post that seems to solve the same problem by patching the kernel. (fyi, search “nvme error duplicate cntlid gentoo forums” on google)

I tried following the instructions to build TrueNAS Scale on GitHub but it seems that my changes do not end up in the package.

Have any of you ever done such a thing? How do I make sure that my changes to the kernel files are used to build the package?

Bye

Andrea

PS: Why can’t you post links or images in this forum?!?

@Andrea

Welcome!

Seems the problem is related to duplicate serial numbers.

Are you using a RAID card or a port expander? Post your full hardware configuration.

P.S. I think you can’t post links since you just joined. This is to cut down on SPAM posts.

Looks like you’re wanting to add the NVME_QUIRK_IGNORE_DEV_SUBNQN support here. In general I don’t recommend bypassing things like duplicate subsystem or UUID checks but it might be necessary.

What are the SSDs in question? I know early model Intel NVMe suffered from this.

Hi @elvisimprsntr,
I am trying to install truenas here: CWWK x86 P6 Pocket SSD NAS Review – NAS Compares

CPU: Intel N355
Memory: DDR5 48GB
nvme: Skyline, model NVME-SD-X550 (Lechnical unità SSD Interna a Stato Solido da 2 TB, M.2 NVMe SSD 2280 - Fino a 1050 MB/s, con Tecnologia Flash TLC 3D, Compatibile con Desktop/Laptop/Notebook : Amazon.it: Informatica) Yes, very cheap… maybe for a reason :slight_smile:

Yes @HoneyBadger, exactly!

I’m trying to make this change to drivers/nvme/host/pci.c:

{ PCI_DEVICE(0x10ec, 0x5765), /* Skyline NVMe */
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN },

I take Vendor ID and Device ID from BIOS:

The problem is how do I make sure that this change is included in the TrueNAS build.