pfSense Support Subscription

Author Topic: Cloning pfsense 2.4.2 harddisk  (Read 320 times)

0 Members and 1 Guest are viewing this topic.

Offline ashima

  • Full Member
  • ***
  • Posts: 124
  • Karma: +2/-0
    • View Profile
Cloning pfsense 2.4.2 harddisk
« on: December 29, 2017, 12:50:42 am »
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


Offline ashima

  • Full Member
  • ***
  • Posts: 124
  • Karma: +2/-0
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #2 on: December 29, 2017, 04:55:13 am »


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

 
     

Offline Grimson

  • Full Member
  • ***
  • Posts: 257
  • Karma: +36/-2
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #3 on: December 29, 2017, 05:46:53 am »
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.

Offline ashima

  • Full Member
  • ***
  • Posts: 124
  • Karma: +2/-0
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #4 on: December 29, 2017, 10:37:07 am »


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

Offline Jailer

  • Sr. Member
  • ****
  • Posts: 405
  • Karma: +54/-2
    • View Profile
    • Bored Guy Blog
Re: Cloning pfsense 2.4.2 harddisk
« Reply #5 on: December 29, 2017, 07:54:25 pm »
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).

Offline ashima

  • Full Member
  • ***
  • Posts: 124
  • Karma: +2/-0
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #6 on: January 02, 2018, 07:50:43 am »

   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

Offline Grimson

  • Full Member
  • ***
  • Posts: 257
  • Karma: +36/-2
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #7 on: January 02, 2018, 03:31:04 pm »
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.

Offline Derelict

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9591
  • Karma: +1089/-309
    • View Profile
Re: Cloning pfsense 2.4.2 harddisk
« Reply #8 on: January 02, 2018, 04:37:50 pm »
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.
Las Vegas, Nevada, USA
Use this diagram to describe your issue.
The pfSense Book is now available for just $24.70!
Do Not PM For Help! NO_WAN_EGRESSTM