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

[HOW-TO] Re-install with GEOM_MIRROR for swap

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
5 Posts 5 Posters 4.2k 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.
  • E
    enoch85
    last edited by Feb 8, 2018, 9:14 AM Feb 8, 2018, 9:09 AM

    Hi!

    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
    5. Reboot
    6. press 8 to access shell
    7. gmirror stop swap && gmirror destroy swap
    8. Reboot with USB
    9. Re-install

    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.

    1 Reply Last reply Reply Quote 2
    • T
      TauCeti
      last edited by May 29, 2018, 1:40 AM

      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
      
      1 Reply Last reply Reply Quote 2
      • S
        stewarrh
        last edited by Dec 2, 2020, 1:29 AM

        Just wanted to say THANK YOU for listing out these commands. Worked perfectly in fixing my "gpart: geom 'ada0': File exists" problem.

        P 1 Reply Last reply Nov 21, 2021, 1:09 AM Reply Quote 0
        • P
          pfsenseuser01 @stewarrh
          last edited by Nov 21, 2021, 1:09 AM

          Created an account to just say THANK YOU SO MUCH!

          Confirmed the above worked for me just like @stewarrh

          1 Reply Last reply Reply Quote 0
          • Z
            zoltar
            last edited by Mar 5, 2024, 1:40 PM

            Thx very much to both. Its my first installation in baremetall and fail.
            I had created the mirror and encrypted the disks and the swap and the error "gpart: geom 'nvd0': File exists" appeared when trying to reinstall.
            I have been able to delete the partitions.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received