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

Add second drive to zfs install (mirror)

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
zfsmirror
4 Posts 2 Posters 1.3k 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.
  • S
    sporkme
    last edited by Jan 4, 2020, 6:34 AM

    Anything to do to add a second drive other than to copy what I see on the first drive with "gpart backup ada0"?

    It looks like I'd want to:

    • put bootblocks on the new drive
    • do something to mirror swap (I assume the installer probably uses gmirror? If so, what does the installer name the gmirror device?)
    • add ada1p3 partition to the existing zfs pool as a mirror

    Does pfsense care about any of this or is it unaware of whether it exists on a single drive vs. mirror? Anything to modify for the swap change from "/dev/ada0p2" to "/dev/mirror/blah" other than fstab?

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Jan 6, 2020, 4:37 PM

      Your subject says ZFS, but your commands mention gmirror. The two are completely different, which is it?

      The CE installer on 2.4.x and later doesn't have anything for gmirror, only ZFS.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • S
        sporkme
        last edited by sporkme Jan 6, 2020, 9:51 PM Jan 6, 2020, 9:50 PM

        My understanding, based on my single disk install, is that swap does not live on a zfs pool/dataset (I know back when zfs came into the tree, it was deemed unsafe and I don't think it supported dumps). Perhaps that's changed, I don't know.

        So if I were to mirror swap, I would be using gmirror I assume, as that's the only option I can think of to preserve swap if a drive fails.

        I do see a standard swap partition on my zfs install, it's not file-backed or using zfs:

        [2.4.4-RELEASE][admin@swamp.foo.com]/root: gpart show
        =>       40  250069600  ada0  GPT  (119G)
                 40       1024     1  freebsd-boot  (512K)
               1064        984        - free -  (492K)
               2048   16777216     2  freebsd-swap  (8.0G)
           16779264  233289728     3  freebsd-zfs  (111G)
          250068992        648        - free -  (324K)
        

        Anyhow, my main question is post-install does pfsense care at all, during normal operation or upgrades, if I've added gmirror for swap and zfs mirroring for my zfs datasets? If it does, what should I be doing to make this look like something the installer created?

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Jan 7, 2020, 1:04 PM

          The upgrade process doesn't care or do anything special depending on the filesystem.

          Honestly it would be faster and safer to just grab a backup and run the installer again to setup the mirror like you want. You'd be done in <10m with no worries about if you did something wrong.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

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