SlideShare ist ein Scribd-Unternehmen logo
1 von 3
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

Weitere ähnliche Inhalte

Mehr von Manish Chopra

Ansible Study Guide ToC
Ansible Study Guide ToCAnsible Study Guide ToC
Ansible Study Guide ToCManish Chopra
 
Microservices with Dockers and Kubernetes
Microservices with Dockers and KubernetesMicroservices with Dockers and Kubernetes
Microservices with Dockers and KubernetesManish Chopra
 
Unix and Linux Operating Systems
Unix and Linux Operating SystemsUnix and Linux Operating Systems
Unix and Linux Operating SystemsManish Chopra
 
Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive AnalyticsManish Chopra
 
Preparing a Dataset for Processing
Preparing a Dataset for ProcessingPreparing a Dataset for Processing
Preparing a Dataset for ProcessingManish Chopra
 
Organizations with largest hadoop clusters
Organizations with largest hadoop clustersOrganizations with largest hadoop clusters
Organizations with largest hadoop clustersManish Chopra
 
Distributed File Systems
Distributed File SystemsDistributed File Systems
Distributed File SystemsManish 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 3Manish Chopra
 
Oracle solaris 11 installation
Oracle solaris 11 installationOracle solaris 11 installation
Oracle solaris 11 installationManish 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 EnterpriseManish 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 LinuxManish 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 6Manish Chopra
 
The Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineThe Anatomy of GOOGLE Search Engine
The Anatomy of GOOGLE Search EngineManish 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-KoenigManish Chopra
 
Computer_Clustering_Technologies
Computer_Clustering_TechnologiesComputer_Clustering_Technologies
Computer_Clustering_TechnologiesManish Chopra
 

Mehr von 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
 

KĂĽrzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 

KĂĽrzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

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