Cloning pfsense 2.4.2 harddisk
-
Hi everyone,
I have recently moved to pfsense 2.4.2. There are lot of packages installed on this box and also this box does an openvpn site to site connection with the head office. I was trying to clone the harddisk so in case of 1st hard disk failure, the user can just connect the secondary hard disk and it is up.
In earlier version of pfsense 2.3.2, I was able to clone the hardisk using acronis but now it clones the second hardisk but doen't boot from the there. Any suggestion on how to clone pfsense 2.4.2 .
Regards,
Ashima -
https://doc.pfsense.org/index.php/Full_Backup
https://doc.pfsense.org/index.php/Configuration_Backup_and_Restore -
Thank you Grimson for replying.
I had already gone through those documents. But this box is going to a remote location. Basically the box is going to have two hardisks. Only the Master hardisk is connected. In case the master fails… the person at remote end will plug out master and plug in the clone hardisk.
I was able to do so with pfsense 2.3.4 using Acronis. But with 2.4, (with GPT) acronis is not able to copy the boot loader. I have tried with clonezilla also but no success. Does any one have any idea how to clone a hdd with GPT.
Thank you
Regards,
Ashima -
Well if those 2 disks are always in the system go for a zfs pool, no manual plugging required if a disk fails.
You can also simply install pfSense on the second disk and restore the configuration from the first disk, this is probably even faster than cloning the disk with an external tool.
-
Thank you once again Grimson. This is exactly what I was looking for.
Here is link of step by step guide for zfs pool in pfsense 2.4.
https://forum.pfsense.org/index.php?topic=126597.0
@Grimson is there anything I need to add ?
warm regards,
Ashima -
That how to is a little outdated now.
The new installer with the guided ZFS install allows you to set up your mirror at install. When you choose the guided install highlight pool type and select it and change the pool type to mirror (the default is stripe).
-
Thanks Jailer,
So the new installer with guided ZFS install with pool type mirror did the trick. I tried my hand on a test machine with two 160 GB identical hdd acting as mirror.
"zpool status" shows both the hardisks online. I physically disconnected one of the hdd, "zpool status" shows degraded. But pfsense boots properly and work flawlessly.Now I introduced one more (new) disk at the same sata connector. How do I replace the old hdd to new hdd in the same pool. I went through the manual page of zpool but nothing seems to work. I ended up goofing up the system and it failed to boot.
I am new to ZFS. Can any one guide what to do if one the hdd fails and I have to replace it with new hdd. Should I first disconnect the bad disk and introduce the new disk at the same sata controller or should I boot with three hdd. Can anyone help.
Thank you,
Ashima -
I went through the manual page of zpool but nothing seems to work.
Make sure you are using the FreeBSD version of the manual: https://www.freebsd.org/doc/handbook/zfs-zpool.html not the Sun version.
-
Regardless of any disk mirroring you have in place, ZFS or GMIRROR, the remote site should always have ready access to a USB installer memory stick/CD for the version they are running and access to a current configuration backup, via Auto-Config Backup or another method.