SlideShare a Scribd company logo
Redefining High Availability on Linux Systems with Wake-on-LAN
Goals
- To extend life of our commodity machines
- Consuming lesser power
- Reduce chances for errors
Today there several HA (High Availability) solutions that ensure fault tolerant services running 24x7
without any interruption to the end user. Several IT companies provide readymade solutions and
there are several available through open source too.
This article presents a simple setup of two Linux machines running RHEL 6.2, that with the help of
CRON and Wake-on-LAN technology, can provide 100% system uptime. The logic here is simple, just
like many other production jobs, one wakes up, and lets the other one sleep after handing over all
updated operations.
In production workloads, services are rendered for long durations before a failover takes place. Here
our node would render services considering the fact that a hardware component, OS, and application
does not crash. This design is made to prolong the life of our commodity hardware like desktops or
laptops, so that they continue to run at scheduled times with the help of Wake-on-LAN technology.
We also make use of CRON scheduling to accomplish this.
Setting up is a fairly simple task. Given below are the tasks needed to be performed.
Step 1 – Install RHEL 6.2 on both the machine, named Node1 and Node2 here
Machine 1 Configuration
Hostname node1.virtorg.net
IP Address 192.168.1.101
MAC Address 44:87:FC:7F:6D:75
Subnet mask 255.255.255.0
Gateway 192.168.1.1
Machine 2 Configuration
Hostname node2.virtorg.net
IP Address 192.168.1.102
MAC Address 44:87:FC:7E:91:DD
Subnet mask 255.255.255.0
Gateway 192.168.1.1
Step 2 – Enable Wake-on-LAN service on both the nodes
Most of desktop and laptop grade machines come with Wake-on-LAN technology these days, also
referred to as WOL in short. The benefit Wake-on-LAN or WOL gives us is powering up and down
machines with a magic packet sent over the ethernet LAN. Some Wi-Fi adapters also allow a variation
called Wake-on-Wireless-LAN. Let us get the WOL configured on both the nodes and test powering up
each other thereafter.
[root@node1 ~]# cd /etc/init.d
[root@node1 init.d]# vi wol
#!/bin/bash
#
# wol Wake-on-LAN configuration script
#
# chkconfig: - 99 01
# description: Wake-on-LAN allows a machine to be started using a WoL network packet.
# This script configured WoL on interfaces listed in $NIC.
# processname: -
# config: -
# pidfile: -
# Source function library.
. /etc/rc.d/init.d/functions
# List of NICs to configure for WoL.
# Note: on Xen hosts, use peth0 instead of eth0.
NIC=.eth0.
if [ "$1" != "start" ]; then
exit 0
fi
echo -n .Enabling Wake-on-LAN for:.
for nic in ${NIC};
do
echo -n . ${nic}.
[ -x /sbin/ethtool ] && /sbin/ethtool -s ${nic} wol g >/dev/null 2>&1
done
# Note: no error checking . ethtool does not return a useful exit code
success
echo
# EOF
[root@node1 ~]# chkconfig wol on
[root@node1 ~]# chkconfig --add wol
[root@node1 ~]# service wol start
Repeat the above procedure for node2 also. Once Wake-on-LAN has been set up on both our nodes,
we can manually test the command "ether-wake" to wake up one node from shutdown state to a
running state as given below. The command here will power up the machine having the given MAC
address.
[root@node1 ~]# /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd
Step 3 – Here is how CRON is configured on both the nodes
Node 1
======
[root@node1 ~]# crontab -l
15 * * * * /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd
20 * * * * /sbin/poweroff
45 * * * * /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd
50 * * * * /sbin/poweroff
Node 2
======
[root@node2 ~]# crontab -l
30 * * * * /sbin/ether-wake -i eth0 44:87:fc:7f:6d:75
35 * * * * /sbin/poweroff
00 * * * * /sbin/ether-wake -i eth0 44:87:fc:7f:6d:75
05 * * * * /sbin/poweroff
With the above configuration, at every 15th and 45th minute, node1 powers on node2, and shuts
down after 5 minutes. Likewise node2 powers up node1 at 30th and 00th minute and powers itself off
after 5 minutes. This cycle continues every hour, and chronologically at 00th minute, node1 is up, at
15th minute, node2 is up, at 30th minute, again node1 is up, and at 45 minute, node2 is up, thereby
repowering up node1 at 00th minute.
Why such a design ? What are the advantages ?
This type of design can be used in many kinds of services. Some examples are highly available Web
server, HADOOP clusters, MySQL database server with replication and so forth. Tutorials on setting up
an HA cluster using Heartbeat are available separately. For now, this is the first step to extend our
commodity infrastructure's life.
Written on 3rd Dec, 2013
Author : Manish Chopra

More Related Content

More from Manish Chopra

Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToC
Manish Chopra
 
Microservices with Dockers and Kubernetes
Microservices with Dockers and KubernetesMicroservices with Dockers and Kubernetes
Microservices with Dockers and Kubernetes
Manish Chopra
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating Systems
Manish Chopra
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive Analytics
Manish Chopra
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for Processing
Manish Chopra
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clusters
Manish Chopra
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systems
Manish Chopra
 
Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3
Manish Chopra
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installation
Manish Chopra
 
Emergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the EnterpriseEmergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the Enterprise
Manish Chopra
 
Steps to create an RPM package in Linux
Steps to create an RPM package in LinuxSteps to create an RPM package in Linux
Steps to create an RPM package in Linux
Manish Chopra
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6
Manish Chopra
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search Engine
Manish Chopra
 
Big-Data-Seminar-6-Aug-2014-Koenig
Big-Data-Seminar-6-Aug-2014-KoenigBig-Data-Seminar-6-Aug-2014-Koenig
Big-Data-Seminar-6-Aug-2014-Koenig
Manish Chopra
 
Computer_Clustering_Technologies
Computer_Clustering_TechnologiesComputer_Clustering_Technologies
Computer_Clustering_Technologies
Manish Chopra
 

More from Manish Chopra (15)

Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToC
 
Microservices with Dockers and Kubernetes
Microservices with Dockers and KubernetesMicroservices with Dockers and Kubernetes
Microservices with Dockers and Kubernetes
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating Systems
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive Analytics
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for Processing
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clusters
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File Systems
 
Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3Difference between hadoop 2 vs hadoop 3
Difference between hadoop 2 vs hadoop 3
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installation
 
Emergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the EnterpriseEmergence and Importance of Cloud Computing for the Enterprise
Emergence and Importance of Cloud Computing for the Enterprise
 
Steps to create an RPM package in Linux
Steps to create an RPM package in LinuxSteps to create an RPM package in Linux
Steps to create an RPM package in Linux
 
Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6Setting up a HADOOP 2.2 cluster on CentOS 6
Setting up a HADOOP 2.2 cluster on CentOS 6
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search Engine
 
Big-Data-Seminar-6-Aug-2014-Koenig
Big-Data-Seminar-6-Aug-2014-KoenigBig-Data-Seminar-6-Aug-2014-Koenig
Big-Data-Seminar-6-Aug-2014-Koenig
 
Computer_Clustering_Technologies
Computer_Clustering_TechnologiesComputer_Clustering_Technologies
Computer_Clustering_Technologies
 

Recently uploaded

PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 

Recently uploaded (20)

PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 

Redefining High Availability on Linux Systems with Wake-on-LAN

  • 1. Redefining High Availability on Linux Systems with Wake-on-LAN Goals - To extend life of our commodity machines - Consuming lesser power - Reduce chances for errors Today there several HA (High Availability) solutions that ensure fault tolerant services running 24x7 without any interruption to the end user. Several IT companies provide readymade solutions and there are several available through open source too. This article presents a simple setup of two Linux machines running RHEL 6.2, that with the help of CRON and Wake-on-LAN technology, can provide 100% system uptime. The logic here is simple, just like many other production jobs, one wakes up, and lets the other one sleep after handing over all updated operations. In production workloads, services are rendered for long durations before a failover takes place. Here our node would render services considering the fact that a hardware component, OS, and application does not crash. This design is made to prolong the life of our commodity hardware like desktops or laptops, so that they continue to run at scheduled times with the help of Wake-on-LAN technology. We also make use of CRON scheduling to accomplish this. Setting up is a fairly simple task. Given below are the tasks needed to be performed. Step 1 – Install RHEL 6.2 on both the machine, named Node1 and Node2 here Machine 1 Configuration Hostname node1.virtorg.net IP Address 192.168.1.101 MAC Address 44:87:FC:7F:6D:75 Subnet mask 255.255.255.0 Gateway 192.168.1.1 Machine 2 Configuration Hostname node2.virtorg.net IP Address 192.168.1.102 MAC Address 44:87:FC:7E:91:DD Subnet mask 255.255.255.0 Gateway 192.168.1.1
  • 2. Step 2 – Enable Wake-on-LAN service on both the nodes Most of desktop and laptop grade machines come with Wake-on-LAN technology these days, also referred to as WOL in short. The benefit Wake-on-LAN or WOL gives us is powering up and down machines with a magic packet sent over the ethernet LAN. Some Wi-Fi adapters also allow a variation called Wake-on-Wireless-LAN. Let us get the WOL configured on both the nodes and test powering up each other thereafter. [root@node1 ~]# cd /etc/init.d [root@node1 init.d]# vi wol #!/bin/bash # # wol Wake-on-LAN configuration script # # chkconfig: - 99 01 # description: Wake-on-LAN allows a machine to be started using a WoL network packet. # This script configured WoL on interfaces listed in $NIC. # processname: - # config: - # pidfile: - # Source function library. . /etc/rc.d/init.d/functions # List of NICs to configure for WoL. # Note: on Xen hosts, use peth0 instead of eth0. NIC=.eth0. if [ "$1" != "start" ]; then exit 0 fi echo -n .Enabling Wake-on-LAN for:. for nic in ${NIC}; do echo -n . ${nic}. [ -x /sbin/ethtool ] && /sbin/ethtool -s ${nic} wol g >/dev/null 2>&1 done # Note: no error checking . ethtool does not return a useful exit code success echo # EOF [root@node1 ~]# chkconfig wol on [root@node1 ~]# chkconfig --add wol [root@node1 ~]# service wol start
  • 3. Repeat the above procedure for node2 also. Once Wake-on-LAN has been set up on both our nodes, we can manually test the command "ether-wake" to wake up one node from shutdown state to a running state as given below. The command here will power up the machine having the given MAC address. [root@node1 ~]# /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd Step 3 – Here is how CRON is configured on both the nodes Node 1 ====== [root@node1 ~]# crontab -l 15 * * * * /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd 20 * * * * /sbin/poweroff 45 * * * * /sbin/ether-wake -i eth0 44:87:fc:7e:91:dd 50 * * * * /sbin/poweroff Node 2 ====== [root@node2 ~]# crontab -l 30 * * * * /sbin/ether-wake -i eth0 44:87:fc:7f:6d:75 35 * * * * /sbin/poweroff 00 * * * * /sbin/ether-wake -i eth0 44:87:fc:7f:6d:75 05 * * * * /sbin/poweroff With the above configuration, at every 15th and 45th minute, node1 powers on node2, and shuts down after 5 minutes. Likewise node2 powers up node1 at 30th and 00th minute and powers itself off after 5 minutes. This cycle continues every hour, and chronologically at 00th minute, node1 is up, at 15th minute, node2 is up, at 30th minute, again node1 is up, and at 45 minute, node2 is up, thereby repowering up node1 at 00th minute. Why such a design ? What are the advantages ? This type of design can be used in many kinds of services. Some examples are highly available Web server, HADOOP clusters, MySQL database server with replication and so forth. Tutorials on setting up an HA cluster using Heartbeat are available separately. For now, this is the first step to extend our commodity infrastructure's life. Written on 3rd Dec, 2013 Author : Manish Chopra