Latest snapshots break bootup on console with old ZFS pool name
-
I was updating our lab devel pfSense VMs to the latest snapshots and got this nice problem on the console output ;)
no bootup afterwards.
That's a problem with this part of
pfSense-rc
startup script:if [ -n "${USE_ZFS}" ]; then # Create ZFS reservation if [ ! -f /.no_zfs_reservation ]; then zfs list -Hp -o name -t filesystem | grep -q pfSense/reservation if [ $? -ne 0 ]; then AVAIL=$( zfs list -Hpo avail pfSense ) RESSIZE=$( zfs list -Hpo avail,used pfSense | awk -v CONVFMT='%.0f' '{printf ( $1 + $2 ) * 0.1 "\n"}' ) if [ $(( ${AVAIL} / 2 )) -gt ${RESSIZE} ]; then logger "Creating ZFS reservation of ${RESSIZE} bytes" zfs create -o reservation=${RESSIZE} pfSense/reservation else logger "Not enough space to create reservation; ${AVAIL} / 2 is not greater than ${RESSIZE} bytes" fi fi fi fi
As the dev box was a bit older, the pfSense ZFS pool is still called "root" and not "pfSense". Updating such a VM/box would break with the current snapshot.
Perhaps the script should check for "root|pfSense" as name for the pool first before assuming? ;)Cheers
\jens -
@jegr
Yep... I have it on the main firewall now. The fun thing is that it's booted and accessible via GUI. Only console is broken for now.
2.6.0-DEVELOPMENT (amd64)
built on Fri Nov 12 06:23:32 UTC 2021
Fixed with patch https://github.com/pfsense/pfsense/commit/56b1a253d5c7e61239aa37a99f24119604641cd8
Could be applied via sytem patches package.