[HOW-TO] Re-install with GEOM_MIRROR for swap
enoch85 last edited by
Just installed pfSense 2.4.2 on a new Firewall and chose to mirror the swap partition which resulted in a GEOM_MIRROR. Both ZFS and the swap are hosted on two SATA-DOM devices with ZFS in a MIRROR.
After some testing I wanted to re-install pfSense to make a clean installation, and when repartitioning the drives as a new ZFS mirror I I ended up with this:
https://imgur.com/a/zrU3X gpart: geom 'ada0': File exists
Whatever I tried I didn't succeed to re-install because the GEOM_MIRROR was mounted during install.
So, how did I solve this?
I figured that I could hash out the mount in /etc/fstab, reboot and then destroy the GEOM_MIRROR with
gmirror stop swap gmirror destroy swap
I then rebooted again from USB and successfully installed a new clean pfSense system.
So basically I did this:
1. Boot as normal
2. Press 8 to access shell
3. vi /etc/fstab
4. Comment out the /dev/mirrir/swap
6. press 8 to access shell
7. gmirror stop swap && gmirror destroy swap
8. Reboot with USB
Hope it helps someone out there.
TO THE DEVS
I think that you should automatically unmount any drives that are mounted in the installer to be able to skip the above steps. Please fix this "bug" in the upcoming releases.
TauCeti last edited by
Thank you so much for posting! You helped me. I had to perform some additional steps and am also posting in case it helps another poor soul:
Setup: ZFS-Auto; RAID Type: Mirrored; Number of Drives: 2; Swap Mirrored: Yes; Other options left as default.
Problem: Attempting a fresh install of pfsense 2.4.3 on x86 hardware. Same error as reported by: enoch85 gpart: geom ‘ada0’: File exists
Same settings were used for the initial and then refresh install.
I learned that the problem is that I had to manually delete all of the existing ZFS partitions (why can't the installer do this?). Annoyingly, if you try to delete or destroy a mounted partition the error message gpart gives you is: Device busy, which is really unhelpful. I could delete the all partitions except for the swap ones (because the installer mounts them). Adding OPs commands resolved this for me. The full suite of commands I had to use to allow me to reinstall were:
gmirror stop swap gmirror destroy swap gpart delete -i1 ada0 gpart delete -i2 ada0 gpart delete -i3 ada0 gpart delete -i4 ada0 gpart delete -i1 ada1 gpart delete -i2 ada1 gpart delete -i3 ada1 gpart delete -i4 ada1 gpart destroy ada0 gpart destroy ada1