I'm in the progress of setting up a new home lab host for Proxmox, but I am hitting a couple of issues, that I think is related to a bug/regression in the NVMe kernel driver.
The setup in short:
Motherboard: Supermicro X14SBI-F
CPU: Xeon 6511P
Mem: 128GB Micron
Boot drives: 2x Kingston DC2000B M.2 240GB drives attached directly in the M.2 slots on the motherboard
In summary, I am facing issues getting the kernel to tecognize both NVMe drives under current 7.0.14-26 kernel, the the first drive fail initialization, but the other works just fine. The symptoms change based on the kernel. When I originally booted on the 9.2 installer with the default 7.0.2-6 kernel, neither of the drives were detected at all, so couldn't even install Proxmox. Going back a step to 9.1 installer, which uses 6.x kernel, all works well. Both drives are detected, and I was successfully able to install Proxmox in a ZFS RAID1 setup on the two drives. I then immediately did upgrade to 9.2. At the next boot, only one of the NVMe drives are enabled, so the ZFS pool is degraded. During boot, the machine appears to be hanging for around 60 seconds during kernel initialization (as it probes the hardware) before continuing. I believe this is a standard NVMe timeout of some sort?
This is representative for what is shown in the boot logs every time:
I have rebooted the machine more times than I can count, and it has always been the device at 0000:2c:00.0 that doesn't come online. 0000:2d:00.0 is as happy as can be.
I have poked around BIOS settings to see if there was anhything that could fix it, but no luck. I have also tried to slow down the PCIe links to 8 GT/s to rule out signal integrity issues, but no change there either. It is expected that the drives only report a x2 link, as Supermicro has only wired two lanes to each of the M.2 slots.
The "good" news is that there is a workaround to get both drives online under 7.0.14-26. If I reset the controller and re-bind it like this:
This brings the controller and drive online instantly, ZFS sees the disk, resilvers it, and all is good. Until next reboot of course.
Doing a PCI device removal and rescan correctly discovers the controller, but initialization still fails (and there's again this 60-second wait):
This gets accompanied by the same log entries as above:
Nothing is running on this machine yet, so I am fine doing experiments on it if that can help narrow down the issue. Just let me know what could be needed.
The ultimate fix is pinning kernel 6.17.13-23 - everything works here. There's no 60-second delay during boot, and both drives are good and ZFS all happy without. Apparently something changed around NVMe controller initialization, reset sequencing, and/or PCIe/DMA handling between the 6.17 kernel and the 7.0 kernel versions. Considering that 7.0.2-6 fails to initialize both controllers, there has been some improvements
.
I have attached lspci output from a broken state (0000:2c:00.0 offline, 0000:2d:00.0 working) along with boot journals from a kernel 6.17.2-1, kernel 6.17.13-21 and the current 7.0.14-26. In the log for 7.0.14-26 you can see that I perform the reset/rebinding around second 3975.
Not sure if this is even relevant, but I also noted that smartctl reports command failures:
I wonder if this is related to the recent changes/fixes to PCIe link training that affected some of the recent kernels?
Thanks for listening to my "rant"...
/Mark
The setup in short:
Motherboard: Supermicro X14SBI-F
CPU: Xeon 6511P
Mem: 128GB Micron
Boot drives: 2x Kingston DC2000B M.2 240GB drives attached directly in the M.2 slots on the motherboard
In summary, I am facing issues getting the kernel to tecognize both NVMe drives under current 7.0.14-26 kernel, the the first drive fail initialization, but the other works just fine. The symptoms change based on the kernel. When I originally booted on the 9.2 installer with the default 7.0.2-6 kernel, neither of the drives were detected at all, so couldn't even install Proxmox. Going back a step to 9.1 installer, which uses 6.x kernel, all works well. Both drives are detected, and I was successfully able to install Proxmox in a ZFS RAID1 setup on the two drives. I then immediately did upgrade to 9.2. At the next boot, only one of the NVMe drives are enabled, so the ZFS pool is degraded. During boot, the machine appears to be hanging for around 60 seconds during kernel initialization (as it probes the hardware) before continuing. I believe this is a standard NVMe timeout of some sort?
This is representative for what is shown in the boot logs every time:
[ 75.434319] pm-core-2 kernel: nvme nvme0: pci function 0000:2c:00.0[ 75.434434] pm-core-2 kernel: nvme nvme1: pci function 0000:2d:00.0[ 75.434646] pm-core-2 kernel: nvme nvme1: D3 entry latency set to 10 seconds[ 75.435229] pm-core-2 kernel: nvme nvme1: 32/0/0 default/read/poll queues[ 75.435234] pm-core-2 kernel: nvme1n1: p2 p3[ 75.438281] pm-core-2 kernel: nvme nvme0: missing or invalid SUBNQN field.[ 75.440017] pm-core-2 kernel: nvme nvme0: request 0x0 genctr mismatch (got 0x0 expected 0x1)[ 75.440032] pm-core-2 kernel: nvme nvme0: invalid id 0 completed on queue 0[ 75.441077] pm-core-2 kernel: nvme nvme0: I/O tag 1 (0001) QID 0 timeout, disable controller[ 75.441093] pm-core-2 kernel: nvme nvme0: Failed to read smart log (error -4)[ 75.441162] pm-core-2 kernel: nvme 0000:2c:00.0: error -EINTR: probe failed[ 75.441231] pm-core-2 kernel: nvme 0000:2c:00.0: probe with driver nvme failed with error -4I have rebooted the machine more times than I can count, and it has always been the device at 0000:2c:00.0 that doesn't come online. 0000:2d:00.0 is as happy as can be.
I have poked around BIOS settings to see if there was anhything that could fix it, but no luck. I have also tried to slow down the PCIe links to 8 GT/s to rule out signal integrity issues, but no change there either. It is expected that the drives only report a x2 link, as Supermicro has only wired two lanes to each of the M.2 slots.
The "good" news is that there is a workaround to get both drives online under 7.0.14-26. If I reset the controller and re-bind it like this:
echo 1 > /sys/bus/pci/devices/0000:2c:00.0/resetecho 0000:2c:00.0 > /sys/bus/pci/drivers/nvme/bindThis brings the controller and drive online instantly, ZFS sees the disk, resilvers it, and all is good. Until next reboot of course.
Doing a PCI device removal and rescan correctly discovers the controller, but initialization still fails (and there's again this 60-second wait):
Code:
echo 1 > /sys/bus/pci/devices/0000:2c:00.0/remove
echo 1 > /sys/bus/pci/rescan
This gets accompanied by the same log entries as above:
Code:
missing or invalid SUBNQN field
request 0x0 genctr mismatch (got 0x0 expected 0x1)
invalid id 0 completed on queue 0
Nothing is running on this machine yet, so I am fine doing experiments on it if that can help narrow down the issue. Just let me know what could be needed.
The ultimate fix is pinning kernel 6.17.13-23 - everything works here. There's no 60-second delay during boot, and both drives are good and ZFS all happy without. Apparently something changed around NVMe controller initialization, reset sequencing, and/or PCIe/DMA handling between the 6.17 kernel and the 7.0 kernel versions. Considering that 7.0.2-6 fails to initialize both controllers, there has been some improvements
I have attached lspci output from a broken state (0000:2c:00.0 offline, 0000:2d:00.0 working) along with boot journals from a kernel 6.17.2-1, kernel 6.17.13-21 and the current 7.0.14-26. In the log for 7.0.14-26 you can see that I perform the reset/rebinding around second 3975.
Not sure if this is even relevant, but I also noted that smartctl reports command failures:
Error Information (NVMe Log 0x01, 16 of 63 entries)Num ErrCount SQId CmdId Status PELoc LBA NSID VS Message 0 56 0 0x0000 0x4004 0x028 0 0 - Invalid Field in Command 1 55 0 0x000b 0x4004 - 0 0 - Invalid Field in CommandError Information (NVMe Log 0x01, 16 of 63 entries)Num ErrCount SQId CmdId Status PELoc LBA NSID VS Message 0 68 0 0x000c 0x4004 0x028 0 0 - Invalid Field in Command 1 67 0 0x001b 0x4004 - 0 0 - Invalid Field in CommandI wonder if this is related to the recent changes/fixes to PCIe link training that affected some of the recent kernels?
Thanks for listening to my "rant"...
/Mark
Attachments
Last edited: