On 08/01/2016 03:58 PM, Adrian wrote:
On Mon, 2016-08-01 at 11:14 +1200, Jim Cheetham wrote:
On Sun, Jul 31, 2016 at 12:21 PM, Adrian <[email protected]> wrote:
What is the best way to mirror an Ubuntu server that runs several
VMs
to an identical hardware configuration for the purpose of having a
stand-by warm swap server.
Obviously there is no single approach that is "the best way".
Instead, what you will end up with will be lots of different
techniques with differing costs/complexities, offering different
benefits :-) Many of them will say "if you were doing things
differently from the beginning ..." - consider these, the cost of
reworking your environment to fit the answer might be better than
trying to retrofit availability into your current environment ...
But, I guess it's reasonable to look for the approach that has the
least change from your current working practices, so you don't have
to
change too much at one go and therefore lose understanding of how the
system actually works.
Step Zero: Backups of everything are essential - remember that "a
backup is not a backup unless you can restore, so test restore every
time you backup". If you can restore from backup quickly enough, you
might already have your near-real-time spare.
Question One: How will you switch between the two? What IP addresses
will they have, when? If you change the IP of one machine to the
"primary" address, will your local network switch realise you've
changed MAC address? Or will you change that too? (If you do change
IP
address, how will you know that you're logged in to the correct
server
- especially important while they are both working). Will you change
the primary status using the local firewall/router?
If your machines are on the same LAN, you might approach the problem
by making the two machines identical in real-time, perhaps by using
disk-level clustering; DRDB is a great approach for this, very
mature.
If all the user data (i.e. the VMs, etc) are on the shared volume,
either machine will get the same view. If the two machines have the
same OS-level configuration, either can do the job of running the VM
-
but you're going to need to make sure that they don't both attempt to
do so at the same time.
That's a start - does that help?
-jim
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
Yes, it does help. A lot. Thanks.
I was afraid of that, that there is no best way.
The background of this is that this is a new production server and both
it and the mirror will be in the same LAN behind a firewall, both with
private IP addresses. Hardware-wise they will be cvasi-identical - same
motherboard, same disk controllers, same disks, same RAM, same RAM
type, same networks interfaces, but there may be some small differences
I am not aware of at this time. They will both run Ubuntu server 16.04
with the same number and types of VMs
A couple of hours downtime in case of failure is acceptable so the
switch between them can even be done manually by changing the settings
in the firewall, but most likely I will automate the switch and set an
alarm or notification for the event.
There is another redundancy layer, but that's a subject for another
thread maybe.
Backups will be performed both locally and remotely and be integrated
in the current backup policy. Restoring backups might work, with full
backup/restore in weekend followed by incrementals every weekday.
However, the data has the potential to grow rapidly and probably in a
year or so this technique will have to be replaced by something else.
look at solutions that use the --link-dest flag for rsync... you end up
with a much more usable archive system, but hard links are employed to
duplicate unchanged files, leading to a pretty efficient use of space. I
still use snapback2, because it just works.
DRBD looks cool. I will have to re-think partitions, but that's
achievable.
The downside of block level mirroring is that if a device driver starts
scribbling over your data, then it's gone in the backup too. Risk there
- and for those of us to whom it has happened, even if it was decades
ago - it may be perceived as higher than it really is ( risk being
subjective and all that! ).
Database replication is pretty simple to set up - especially in this
situation where you'd just need a master-slave configuration, and disk
space is cheap enough for you to set up a wee iSCSI server / cluster if
you want to go that way ( I probably would, if the servers were
sufficiently important to the business ): less chance of you losing the
front end server and your storage server at the same time, and raid
should help with protecting the data...
You've also got clustered file systems ( GlusterFS for example ), and
'self healing' zfs is ( IIRC ) available and 'legal' in 16.04.
Alternatively, tools like lsync are handy if you want to take a more
manual approach ( although I still back them up with a manual rsync on a
regular basis ).
Also, if you use LVM ( I know it's not as popular on the debian side but
I do with jessie ), then you can run your VMs directly in a Logical
Volume, allowing you to make more ( never too many! ) backups via
snapshotting.
If I may deviate a bit from the initial subject, suppose I go down the
path with different techniques employing rsync, database replication
and others, is there a project/package/application that will allow me
to chain various scripts, pass parameters and create other logic and
then show the end result in a (preferably) web interface? I'm thinking
something similar to the old Opalis that eventually got bought by MS in
2009.
Or a way that will make my life and that of whomever will take over
later on easier in maintaining the resulting scripting tangle.
I still use trac (:
Adrian
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users
hth,
Steve
--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users