Hi, I tried this over noon and I have some good news. The workaround
seems successful (I did a few reboots, and snaps did not break again).

However, I can imagine this to be a difficult call to make: not
everybody has zfs installed, let alone be /var/lib/snapd be a zfs
dataset (although that actually makes a lot of sense ;-)).

So I only did one action: I added to following mount unit
/etc/systemd/system/var-lib-snapd.mount:

[Unit]
Description=Mount unit for snapd
Before=snapd.service

[Mount]
What=zpool/var-lib-snapd
Where=/var/lib/snapd
Type=zfs
Options=zfsutil

[Install]
WantedBy=multi-user.target

Some impressions:
- this does not break zfs-mount.service (it will skip the already mounted 
dataset)
- this does not require changes to the mount units for installed snaps nor 
snapd.service
- this method uses zfsutil, which IGNORES the 'canmount' property of the zfs 
dataset
- if /var or /var/lib are zfs datasets as well, this will probably break again

Let me know if you want to test other scenarios or get more info, I'll
set this up in my VM so I can test more easily.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1750059

Title:
  snaps appear broken when /var/lib/snapd is a zfs dataset

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1750059/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to