Preventing Proxmox from importing zpools at boot

Feb 9, 2016
7
0
1
Dear community,

i am running a proxmox VE4.1 host, on which I perform PCI-pass-through of a SATA-Controller to an openmediavault-VM, which in turn manages the attached storage using ZFS.

At every host reboot, proxmox imports the zpool created by the openmediavault VM. Is there any way to prevent this? I already tried setting the ZFS_POOL_EXCEPTIONS parameter in /etc/default/zfs, as well as manually erasing the zpool.cache file under /etc/zfs, both to no avail.

Needless to say that ZFS on proxmox host gets confused when drivers of the SATA controller get reassigned to vfio-pci, as it continues to believe that the pool is still present, though the drives are no longer accessible. Changing of the pool structure in the OMV VM doesn't bode well with ZFS on the host either.

I am currently working around the issue by performing a pool export through a zpool export command in /etc/rc.local, which gets executed before start of the OMV MV, but I would prefer a solution in which proxmox does not import the pool in the first place.

Any help would be very much appreciated.
 
Sorry for reviving an old thread, but was this ever resolved? I am experiencing the same issue.
 
If you're using a separate SATA card for your setup, you can blacklist the driver module for it. Eg. plut "blacklist mpt2sas" (use the module for your card) in /etc/modprobe.d/pci-redirect.conf and reboot.
 
Sorry for reviving an old thread, but was this ever resolved? I am experiencing the same issue.

I think if you use the cache file, the systemd units should only import the pools contained within. So just make sure that the pool you don't want imported on boot is never imported on the host, or at least not without "-o cachefile=none", and you should be good to go.

Alternatively, if you only have an rpool that you want to mount on boot, you could also disable both "zfs-import-scan.service" and "zfs-import-cache.service", as the rpool is already imported in the initrd.
 

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!