Add gmirror + 2nd SSD post install?
-
I have a 2.2.4-RELEASE (amd64) full install and in service. Can anyone point me to info on how to replace one SSD with two new SSD's in Raid1 w/gmirror? Only info I can find is @ https://doc.pfsense.org/index.php/Create_a_Software_RAID1_%28gmirror%29 which requires a complete reinstall and doesn't offer much detail. I ran into a post a few months back that described more detail what to backup, how to migrate existing data to raid1, ect. but can't seem to find it after much advanced searching here and google. Appreciate the help.
-
Whew! Finally found it @ https://www.freebsd.org/doc/handbook/geom-mirror.html. I hope "18.3.2. Creating a Mirror with Two New Disks" is suitable instruction when PfSense is involved or it's gonna be a long night. Thanks just the same…
-
A simple config backup, reinstall and config restore should get you up and running on the new installation with old settings in less than 30 minutes.
-
Thanks Fragged for the quick reply. The instruction in the FreeBSD handbook copies the data to the mirrored drives so no reinstall is required. Trying to determine if FreeBSD 10.1 supports TRIM when GMIRROR is in use. And if TRIM will be on the mirrored drives if all data is copied from single drive to Raid1 drives. Perhaps following the handbook only to the extent of mirror, partition, format would be better, followed by using the PfSense installer. Been a while so I don't recall if PfSense installs TRIM or it has to be installed ahead of time. Seems to me it's the latter. Still outlining a procedure.
-
You're wasting your time trying to mod it onto an existing install… Seriously, back it up, install from the .iso and use the built-in gmirror installer option. It's right there and does it all for you properly. Using this technique you can be up and running in under 10 minutes. Probably under 5. It's just not worth the hassle of doing it manually when it will have much more downtime and be much more likely to break.
Trying to slap a mirror on an existing disk is going to be problematic since the mirror metadata is going to overwrite part of the partition table and create an invalid setup. That's why our wiki docs have been changed to reflect the fact that you have to do it before installing. FreeBSD <=8.x didn't check those things as strictly and led people into a false sense of security.
-
Thanks Jimp for your response. I'm reading what I should not do but I'm not entirely clear on what procedure I should use. Are you saying I should follow https://doc.pfsense.org/index.php/Automatically_Restore_During_Install after removing my old drive and installing the two new SSD's? And this will install raid1, gmirror and trim as part of the ISO install when it detects two SSD's? Or will one of these three features be left out and have to be done manually? And will the config.xml file accommodate the change to two drives in Raid or at least rebuild itself accordingly during the install process?
Just trying to avoid any surprises.
-
Take a config backup from Diag > Backup/Restore
Copy that config.xml to a thumb drive as x:\conf\config.xmlBoot from your install media (CD, or some other usb drive) with the config-bearing thumb drive plugged in also
When it reaches the installer, select the option to create GMIRROR, pick both your disks, and then proceed with the quick install.
It won't set trim automatically, but it will setup RAID1 with the selected drives and then perform the install using your existing config.xml automatically. Once it reboots post-install, it should be like it was before, but with RAID.
-
Thanks so much Jimp. I'll follow your procedure after determining again how TRIM gets installed. Been a while but I'm sure I can find it. Hopefully TRIM is compatible with RAID1.
-
This is probably a dumb question. But can anyone quickly tell me if the PfSense installer (full install from CD) partitions and formats an SSD and sets the proper partition offset? Or does this need to be done beforehand? The doc @ https://doc.pfsense.org/index.php/Installing_pfSense isn't clear. Thanks.
-
There is no special code in the installer to handle any sort of alignment/offset at this time.