Disable PCI device in early boot

B.Hoejte

Member
Jul 29, 2019
1
0
6
55
Hello.

Briefly:
Is there any way to get systemd to ignore a specific PCI slot?
Alternately, is ther a way to disable automatic raid detection, so that it only detects the arrays actually specified in the mdadm.conf, and ignores other auto-detected arrays?

A bit longer:
I've installed proxmox on a new machine i've bought for the purpose, and I've got it up and running. I have two Broadcom 9300-8i HBA cards installed, one of which i've passed through to a VM.

The setup works quite nice, and the one card and disks are directly available on the PVE host, whie the other card and connected disks are available in the VM.

My one problem - at the moment - is, that every time I boot PVE, it gets stuck in the systemd rescue prompt, because it saw some disks earlier in the boot sequence. These disks are no longer available when it looks for them again later. The card and disks has been passed through to a VM, and are no longer available on the PVE server. When I press CTRL-D to continue, everything starts up without problems, as the disks are not used for PVE.

As both HBA cards are exactly the same model, blacklisting the driver in the boot sequence is probably not the best option here.

I've tried to disconnect the PCI card via udev rules and updated the initramfs, but those rules seem to come after systemd has done it's detection.

It's a bit annoying not being able to just restart the server without having to get to the console of the thing.

/Bjørn
 
As both HBA cards are exactly the same model, blacklisting the driver in the boot sequence is probably not the best option here.
just on a hunch, without testing it - if you configure vfio-pci to grab the one HBA, you could add both modules (vfio first, your HBA driver afterwards) in /etc/initramfs-tools/modules - they should be loaded in that order presented there.
as an alternative check the manpage of systemd-modules-load.service - and add vfio to the kernel command line

I hope this helps!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!