How to rename the ZFS pool of an Incus storage pool?

I renamed the ZFS pool that was used for the Incus default storage pool in an attempt to solve a problem on the host. This broke the Incus storage (of course). What is the correct way to rename the ZFS Pool backing an Incus storage pool?

I searched the forum and “Renaming a zpool with containers” is the only post I found. It isn’t really about renaming the ZFS pool underneath but about renaming the Incus storage pool itself, which is a different problem from mine. (A better title might have been “Renaming an Incus storage pool”.)

Anyway, I attempted to directly edit the configuration but it failed.

$ incus storage edit default
Config parsing error: Pool source cannot be changed when not in pending state
Press enter to open the editor again or ctrl+c to abort change
^C

What is the correct way to rename the ZFS pool of an Incus storage pool?

Note: I temporarily reverted the rename of the ZFS pool to get Incus working again but still need to rename the pool to solve the problem on the host.

Incus requires a default storage pool at all times. I think the typical workaround is to create a secondary storage pool, make that secondary storage pool the default storage pool, now perform the ZFS work, make Incus aware of the new ZFS pool, finally switch back to the updated default storage pool.

Thanks Simon. That makes perfect sense. I’ll report back once I’ve given it a try.