Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Latest snapshots break bootup on console with old ZFS pool name

    Scheduled Pinned Locked Moved CE 2.6.0 Development Snapshots (Retired)
    2 Posts 2 Posters 761 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JeGrJ
      JeGr LAYER 8 Moderator
      last edited by

      I was updating our lab devel pfSense VMs to the latest snapshots and got this nice problem on the console output ;)

      28d4b360-3d1d-467b-b778-75c58706fb2a-image.png

      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

      Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

      w0wW 1 Reply Last reply Reply Quote 0
      • w0wW
        w0w @JeGr
        last edited by w0w

        @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.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.