ZFS on root - separate dataset for /var/lib/incus or not?

If I want to use Incus on a system with ZFS on root (Incus storage pool on rpool/incus), should I separate /var/lib/incus (so it doesn’t get out of sync with the storage pool during a system rollback) ? Or should I keep it in the root dataset to ensure it always matches the Incus version (with the risk of the storage pool not matching the database) ?

In your specific situation, it’s probably best to have them on the same pool so they roll back together.

Though I’m not sure why you’d want to rollback the ZFS pool containing your instances when you could instead just have Incus manage the snapshots and rollback for those instances directly.

I don’t want to rollback the dataset with the instances (rpool/incus), but my host OS dataset (rpool/ROOT/ubuntu) with like ZFSBootMenu. But if I do that and /var/lib/incus is not separated, it would also rollback the incus database (and it would have entries in it for containers again, that don’t exist anymore or vice versa). But if I would separate it, then maybe the host OS snapshot (that I rollback to) restores an older Incus version maybe not compatible with the newer database. Both situations seem bad to me.

Ah right, that makes sense. You indeed wouldn’t want the Incus DB to go back in time when its pool doesn’t :slight_smile:

Incus will refuse to start if you revert to an Incus version that predates the schema of the data on disk, so no risk of weird corruption or anything, it would just fail to start.