Mirroring a root filesystem from one computer to another for availability

Kralj Karlo karlo at klarinet.osamsb.hr
Sun Apr 5 17:36:27 UTC 2020

When hardware breaks, I generally want to fix it or switch to other
hardware until I fix the first hardware. I tend to break things further
when I do either of these, so I have decided to get at least two of each
hardware so that I can easily move things off one broken hardware until
I fix it.

I would like set up two machines with practically identical hardware and
keep their data the same so that when one breaks I can start using the
another. I want to mirror all filesystems, including root, and I do not
need failover to happen automatically. In fact, I would prefer to keep
the spare hardware off most of the time, and I am fine with the mirror
being out of date. For context, this is my personal computer at home.

My inclination is to set up each machine with two separate FreeBSD
systems on separate zpools on separate hard drives, use one for the main
system, and use one just for mirroring. (The mirroring system would use
two small cheap disks  in a mirror.) When I want to switch which system
is the master, I would change the boot device in the BIOS. Is there a
better way?

For example, is HAST appropriate?

I am specifically curious about this detail: Since I want to mirror
the root filesystem, it seems that the only safe way is to have a second
root filesystem. The second could be in RAM or on another dataset or
on a separate hard drive. It could be a copy of first filesystem or a
totally separate filesystem. What is an easy way to set this up, or is
there a safe way that does not require a second root system?

Also, I wouldn't mind thoughts on networking, but I am confident that
the networking will be straightforward, so I'm mostly wondering how to
mirror the hard drives.

More information about the freebsd-questions mailing list