Project

General

Profile

Actions

Regression #12517

closed

pfSense-rc console errors on old zfs scheme (zroot)

Added by B C about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Operating System
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.01
Release Notes:
Force Exclusion
Affected Version:
Affected Architecture:

Description

After update to 2.6.0.a.20211111.0600 from ~Oct.24-2021 build, and booting with older zfs layout (zroot instead of pfSense), console shows errors:

cannot open 'pfSense': dataset does not exist
cannot open 'pfSense': dataset does not exist
/etc/pfSense-rc: arithmetic expession: expecting primary: " / 2 "
Enter full pathname of shell or RETURN for /bin/sh:

Hitting enter and exiting shell causes a startup loop. Looks to come from these lines in pfSense-rc, around line 460:

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 AVAIL is looking for "pfSense", it is blank where "zroot" is used, therefore reservation calculation fails. "touch /.no_zfs_reservation" does allow for a proper boot.

Actions

Also available in: Atom PDF