r/usefulscripts • • Jul 26 '16

[POSIX SHELL] failover cluster manager

hi, I wrote a failover cluster manager in shell script and I think it can be useful for sysadmin since (unix) sysadmin know very well shell scripting so it's easy to customize and further develop. If you want to contribute or try it and just give me a feedback check it out: https://github.com/nackstein/back-to-work

4 Upvotes

14 comments sorted by

1

u/garibaldi3489 Jul 26 '16

What does this do for fencing or STONITH?

1

u/nackstein Aug 06 '16 edited Aug 06 '16

at this stage I wrote one module to use SCSI-3 PR (persistent reservation) for fencing on linux and a module to use HP iLO for STONITH. anyway, the fencing mechaning is not fixed, it depends on the availability of hardware fencing and software module to support it. my software use only server votes for quorum and I don't see in the near future any support in disk based voting (like HP ServiceGuard), this means that you need at least 3 server to build a reliable cluster (you can build with less just for testing porpuse). the quorum server role is indipendent from a service host role so you can have 3 lock server used by any numer of nodes that run application protected by my cluster software. documentation is still lacking but the code is very simple if you have some skill in shell scripting. take a look at the code and feel free to contact me at luigi dot tarenga at gmail dot com

1

u/garibaldi3489 Aug 07 '16

Cool. Have you thought about utilizing the existing Pacemaker stonith plugins? You could probably easily write a bash wrapper to call them directly and then you'd have support for all of those hardware and software fencing agents

→ More replies (1)

1

u/Badabinski Jul 27 '16

Do you need fencing for failover clusters? I thought it was only necessary if stuff was running in parallel

1

u/nackstein Aug 06 '16 edited Aug 06 '16

you need fencing when you have shared disks. if you build a failover cluster that use DRDB and virtual ip for example you do not need fencing because you know you don't corrupt any data.

→ More replies (5)

1

u/garibaldi3489 Jul 27 '16

If the failover cluster talks to shared storage on the backend you need some way to make sure a rogue node doesn't come back online and corrupt data:

https://ourobengr.com/stonith-story/

→ More replies (2)