beadm
beadm copied to clipboard
Feature request: Automatically adjust legacy mounts in fstab
I have a zpool on which I have both FreeBSD and Linux. I have separate datasets under FreeBSD for things like /usr
, /var
, ...
I don't want to set their mountpoints as ZFS properties and use the canmount
property, because mounting these does not make sense when I boot into Linux, which has its own /usr
. I resorted to using legacy mounts and fstab for everything, because that way FreeBSD and Linux can each have their own fstabs that only mount the correct things.
However, this does not work automatically with beadm, because when creating a new BE, the fstab in the new BE still refers to the datasets from the old BE. I need to manually adjust the fstab, so the right datasets are mounted when I reboot.
It would be nice if beadm could automatically adjust the fstab in the new boot environment by searching it for entries for the old datasets and adjusting them to refer to the new ones.
For example, my old BE dataset name is zfs/FreeBSD/default
and contains datasets zfs/FreeBSD/default/usr
and others, which have mountpoint=legacy
and are listed in fstab. When i do beadm create upgrade
, it creates the correct dataset hierarchy under zfs/FreeBSD/upgrade
, which is nice, but the fstab still contains zfs/FreeBSD/default/usr
rather than the new zfs/FreeBSD/upgrade/usr
. It would be nice if beadm could also automatically correct the fstab to refer to the new datasets.