Proxmox automatically scanning and importing zfs pools as soon as a disk is connected

Anotheruser

Member
Sep 21, 2022
70
22
13
When a new disks becomes available (even long after the system booted) it shows up under zfs pools after 1 or 2 seconds and when it was already previously added in the datacenter also becomes available as storage.
I was wondering if this is by design or just some coincidence, bc i need this to reliably work and would otherwise have to make a script that ensures a zfs import all is runn after the disks come online.
 
there are only two auto-imports for zpools in PVE
- at boot time ("zfs-import-scan/-cache/@$POOLNAME")
- via the storage layer, if a storage.cfg entry exists for the pool

so no, plugging a disk at runtime will not auto-import a pool, unless you already have a storage.cfg entry for it (in which case, the next "thing" that tries to use that storage will activate it, which includes importing the pool).
 
  • Like
Reactions: Kingneutron