Can i enable 'copies=x' with ZFS before actually installing pfSense 2.4 to disk?

  • Hello,

    as a long time user of FreeBSD and FreeNAS is was happy to see a ZFS install option coming to pfSense 2.4.0.

    My pfSense box can hold only one drive, so a mirror is not an option.
    Therefore, to get a chance at repairing faulty data, i intend to use the ZFS property 'copies=3'.

    Disk space is plenty (256GB), so i'd like this property to be already set at install time before pfSense is written to disk.
    This way all data on the disk would be redundant, including the OS.

    I installed pfSense 2.4.0 to a VM, but could not find any option to set the copies property, or other properties, before data is written to the ZFS dataset mounted at '/'.
    Is this really not possible at the moment, or did i miss something?

    Thank you,

  • I have a similar need. I've recently reinstall to move my pfSense build on to ZFS. I have a single 128Gb M.2 drive so have plenty space and IOPS to spare. I don't want to add a second disk even though that would give the best level of redundancy as I don't have space inside the unit.

    I would like to enable copies=2 which is easy to do but I would like to apply this to my full installation rather than just newly create blocks.

    I was thinking of doing the following but I'm not sure if this is sensible.

    Boot with FreeBSD ISO version that matches my current pfSense install "FreeBSD 11.1-RELEASE-p2". The do the following

    1. Drop to shell
    2. import ZFS pool and mount
    3. create new datasets with same name as existing with "-new" at the end and set copies=2
    4. cp -ax <source-path><destination-path>5. zfs rename original datasets so that "-old" is appended
    6. zfs rename new datasets so that "-new" is removed from name
    7. check zpool bootfs is correctly point and new boot path change if needed.
    8. unmount and export ZFS pool

    Would the above work?</destination-path></source-path>

Log in to reply