Correct canmount settings
psy0rz opened this issue · 2 comments
I have been an issue when trying to boot other states: It had some mount issues for datasets under /var and /usr.
Upon further investigation it seemed that it mounted an empty var and usr dataset.
My canmount for these filesystem has been off from the beginning it seems:
psy@psyt14s:~$ zfs get -r -t filesystem canmount rpool/ROOT/ubuntu_amp4gc
NAME PROPERTY VALUE SOURCE
rpool/ROOT/ubuntu_amp4gc canmount on default
rpool/ROOT/ubuntu_amp4gc/srv canmount on default
rpool/ROOT/ubuntu_amp4gc/usr canmount off local
rpool/ROOT/ubuntu_amp4gc/usr/local canmount on default
rpool/ROOT/ubuntu_amp4gc/var canmount off local
rpool/ROOT/ubuntu_amp4gc/var/games canmount on default
rpool/ROOT/ubuntu_amp4gc/var/lib canmount on default
rpool/ROOT/ubuntu_amp4gc/var/lib/AccountsService canmount on default
rpool/ROOT/ubuntu_amp4gc/var/lib/NetworkManager canmount on default
rpool/ROOT/ubuntu_amp4gc/var/lib/apt canmount on default
rpool/ROOT/ubuntu_amp4gc/var/lib/dpkg canmount on default
rpool/ROOT/ubuntu_amp4gc/var/log canmount on default
rpool/ROOT/ubuntu_amp4gc/var/mail canmount on default
rpool/ROOT/ubuntu_amp4gc/var/snap canmount on default
rpool/ROOT/ubuntu_amp4gc/var/spool canmount on default
rpool/ROOT/ubuntu_amp4gc/var/www canmount on default
My question: Is it correct, or should they have been on? If I turn them on on these default datasets i run into the same issue.
If i populate them with correct data and create a new state, i seem to be able to boot it.
I think there is a bug in which the early boot of zsys so that it does not honor the com.ubuntu.zsys:canmount setting.
psy@psyt14s:~$ zfs get com.ubuntu.zsys:canmount rpool/ROOT/ubuntu_amp4gc/usr@test2
NAME PROPERTY VALUE SOURCE
rpool/ROOT/ubuntu_amp4gc/usr@test2 com.ubuntu.zsys:canmount off:local local
So its set to OFF, but it still mounts it when i boot that state.
Tried with zsys 0.5.8 on Ubuntu 20.04 with kernel 5.11.13-051113-generic and zfs 2.0.4-0york2~20.04.
Its not a very standard environment so maybe thats what triggering the bug?
As told on the other bug report, I will have to close this as you have an unsupported combination of ZSys/ZFS on 20.04. This could really be the cause to the bug as we had to backport many things in hirsute to make it work.
both rpool/ROOT/ubuntu_amp4gc/usr
and rpool/ROOT/ubuntu_amp4gc/var
are supposed to be canmount=off, so this is correct. (which is what the custom tag is about and respected).
I think you have an issue with the generator, which has great chances to be triggered by your ppa ZFS version. I really suggest reverting (if the dataset state is not corrupted) to the standard and supported version from the distro.
Ah i didnt realize it needed additional patches/changes for that.
I cant rollback for now since i need some of the newer ZFS features for testing. I'll just wait until hirsute is released.
Thanks :)