Add second drive to zfs install (mirror)
-
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?
-
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.
-
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?
-
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.