Hackers.mu mesmerising speech at the DevConMru 2017

The message was clear and direct at the DevConMru 2017. Painted with a humorist approach, Loganaden Velvindron #2 of hackers.mu bridged the gap between students who were mainly in the audience to reach their goal in the IT industry and Linux in Mauritius.

The DevConMru is a yearly event to bring together developers, beginners, students and professionals. The goal is to bring more craftsmen under the same roof. “Mauritius has been branded “Cyber Island” in the Indian Ocean… Opinions in those matters vary but with this conference we strive to improve the general attribution of our island. Mauritius has great political stability and economical advantages for foreign investors, and the most precious resource Mauritius has to offer is people’s knowledge. The ICT sector in Mauritius is growing since years and maturing as the fourth pillar of our economy. With its geographical position Mauritius is also welcome as a business and knowledge hub between Africa and Asia.”MSCC.

In today’s Mauritius IT industry, everyone wants to have a better standard of living. But how? How to build a successful IT industry? Are we moving in the right direction? Are foreign investors attracted by the quality of the Mauritius IT industry ? Logan did not miss those points to bring the audience on the track.

Photo Credits: Hackers.mu
Photo Credits: Hackers.mu

After giving a brief intro of the hackers.mu team, Logan explained the requirements and life cycles of IT companies and their profits as to whether they are in the same line of fresh IT graduates and professionals. A vivid example is by analyzing the statistics of Github accounts in Mauritius, the quality and quantity of code contribution compared with Singapore. Students were encouraged to publish their coding exercise on GitHubs, create a blog and take part in Google Code-in.

Indeed, hackers.mu work towards such goals, for example, participation and mentoring for the Google Code-in. Several hackathons were organised. Contributions in the real world applications such as Pfsense, OpenSSH, OpenSSL, OpenBSD, LibArchive, Firejails, Linux and others.. This list is long. An award was also received during the IETF 98 Hackathon.

Logan at the DevConMru 2017
Logan at the DevConMru 2017

The slide can be viewed here or on the Scriba website.

I was impressed how Avinash Meetoo, honorary member of the hackers.mu hacked the audience and shed some light to boost the students. Avinash mentioned himself about his passion for blogging and the importance of projecting his personality with the right vision.

At hackers.mu, we invite many to join us, but one have to work hard to attain a certain level of professionalism.  After the presentation, many came to congratulate us for the job done. We were around chatting with many sharing our work and job experience as well as the passion for coding. I once read a phrase in an old book as follows “You are what you eat”.  But things have change now because You are what You CODE!!


Recovery Data and Applications with Zerto – Part 2

The flexibility of Zerto Virtual Replication means that we have multiple options for data recovery depending on what’s specifically needed in each use case. ZVR enables data mobility by adding offsite cloning to the toolkit. You have the ability to restore specific files and folders. Now if a critical folder is inadvertently erased, the clock can be rewind by saving time and money.

JLFR -Journal Level File Restore is a powerful feature that extends Zerto’s protection features to allow recovery of individual files or folders. Restoring a file uses the same checkpoint system to facilitate point in time selection and recovery. Any files in the journal can be recovered with the journal sizing tool. JLFR requires NTFS or FAT and is thus Windows compatible only.

To restore a file, click on “Actions” and then on the “Restore File” button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Select the ZFileServer and click on next

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Files can be restored from the available checkpoints.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

The disk need now to be mounted whether physical or virtual that stores the files or folders to recover. Only one disk at a time can be recovered.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

After that, the mount process can start.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

As usual, the running tasks will be shown running on the dashboard. There are few ways to start restoring files and folders from the mounted disk, including from the monitoring tab or the open folder icon on the right under the running tasks.

For example on the bottom, there is a tasks button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

The browse button allows you to search for the files and restore it. Once finish click on the unmount button.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Another feature is cloning – Cloning will create a copy of the virtual machines saved to a specific point-in-time checkpoint.

By selecting the VPG name from the VPG tab which will open the VGS’s name in another tab. Click on More then on offsite clone.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Once on the Offsite Clone tab, click on Select a checkpoint.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

For example, by selecting the latest checkpoint and the name of the Datastore, we can start the cloning operation.

Another recovery option is the backup restore. This is done by clicking on Actions then on Restore Backup. Again from some options, few things need to be checked. By choosing the restore plan which is the name of the VRA, the restore point, VM settings and the Power On option.

Photo Credits: Zerto.com
Photo Credits: Zerto.com

And finally the Restore Button

Photo Credits: Zerto.com
Photo Credits: Zerto.com

Restoring from backup allowed you to leverage scheduled and unscheduled backups that extend the protection offered by the journal. Cloning extends ZVR by  giving you multiple copies of your machines as they looked at a very specific point in time. With the file restore feature, you can extend the functionality of ZVR across the full spectrum of disaster recovery options, ranging from recovery of an entire virtualized datacenter to recovery of just one single file.


SAR command daily tips and tricks

As promised on Twitter days back, I would post some interesting tips and tricks using the SAR (System Activity Report) linux command. The sar command writes to standard output the contents of selected cumulative activity counters in the operating system. The accounting system, based on the values in the count and interval parameters, writes information the specified number of times spaced at the specified intervals in seconds. If the interval parameter is set to zero, the sar command displays the average statistics for the time since the system was started.die.net 

Understanding SAR and its main configuration files

The SAR command is part of the sysstat package which is a multi-purpose analysis tool and it is useful to pin point specific issue related to CPU, Memory, I/O and Network. The command is really useful especially to plot the output on a graph for visual analysis and reporting. One example of such tool is GNUplot. To install GNUplot and SAR use the command yum install sysstat gnuplot. The configuration file of SAR is located at /etc/cron.d/sysstat and /etc/sysconfig/sysstat . If you would perform a rpm -ql sysstat | less , you would noticed that there are other binaries such as iostat,mpstat,pidstat etc.. that comes along with the package sysstat.

Difference between SA and SAR logs

In the directory /etc/cron.d/sysstat you would noticed that there is a cron which have been set up by default to run every ten minutes. The purpose is to write a log in the directory /var/log/sa . In this directory there are two type of files starting with sa and sar. SAR is the text file while SA is a binary. The sa file – Binary is updated every 10 minutes whereas the sar file is written at the end of the day. This parameter have been configured in the cron itself. By using the file command you would know which one is a binary or a text file.

To open the sa file, you need to use the command sar -f . Here is an example:

The /etc/sysconfig/sysstat file allows you to configure how long you want to keep the log, compression etc..

Some ways to use the SAR command

You can also visualize sar logs live using the sar command with the start and ending second. Let’s say you have run a command on the background or simply want to track the resource status for some seconds, you can use the command sar 1 3 Here is an example with the command

sar 1 3

Checking the load average, we apply the same principle but with the following command. The load average will also include load on each processor.

sar -q 1 3

To check for memory being consumed per seconds, use the following command

sar -r 1 3

To check number of memory coming in and out of the swap space, use the following command

sar -W 1 3

For the Disk I/O read write per seconds use the following command. Read/Write on disk also depend on the hardware

sar -b 1 3

For info about the CPU use the following

sar -u 1 3

To monitor the network activity in terms of packets in and out per interface received and compressed, use the following command

sar -n DEV 1 3

If the sar file has not been generated yet from the binary, you can use the following command, let’s say to convert it to a text in the /tmp directory.

sar -A -f  sa25 > /tmp/sar25

KSAR Graph with SAR logs

Now, in production environment, you need to to analyze for example at a specific time where memory or CPU was high. This can be done by means of a graph. I use the Ksar program. Ksar is a BSD-Licensed JAVA based application which create graph based on sar logs. You will need to install JAVA Runtime and launch the run.sh script to install the Ksar program. Once downloaded, just click on ‘Data’ and ‘Load from text file’. This is an example of swap usage

TIPS:

  • The SAR output by default is in 12 hour clock format. To make it become a 24 hour clock format edit the .bashrc file and insert the parameter alias sar=”LANG=C sar
  • GNUPlot is one another application to plot your information on a graph for better analysis.

Recovery Data and Applications with Zerto – Part 1

By doing a failover test with Zerto features, we know that in a real disaster or disruption, everything is configured correctly and working as expected. Because if we put our VMs in a VPG, an entire multi-VM application can be rigorously tested without any interruption to that same application in production.

By clicking on the Failover button on the right bottom, we can start a failover test. The VPG can be ticked and click on next to continue.

Photo credits: Zerto.com

The execution parameters are that which have been set up in the VPGs for example, boot sequence and checkpoint dates etc..  The Failover Test section is where you can start the Failover test.

The failover test creates VMs in a sandbox using the test network defined in the VPG settings. All testing is written to scratch volumes. The longer the test, the more space is consumed. At the end of the test, ZVR will power on the test VMs and do so in the correct boot order if one was specified.

The test will keep writing to scratch volumes until either:

  • The hard journal storage limit is reached
  • It’s manually stopped.

Photo credits: Zerto.com
Photo credits: Zerto.com

Since Zerto automates the test cleanup, you should only stop a test from within a vSphere client. In a live environment, you would then verify the results of the test in the recovery site and ensure each VM is performing as expected. Assuming a successful test, you can come back to the ZVM and click “Stop” under the running task section.

Photo credits: Zerto.com
Photo credits: Zerto.com

The report tab provides detail on the test ran. This can be used for confirmation of test success or failure and aid in compliance. The recovery reports can also be exported in PDF.

A live failover test can also be performed. This is an example from where you can toggle from test to live failover.

Photo credits: Zerto.com
Photo credits: Zerto.com

I have to choose the VPG and click on next

Photo credits: Zerto.com
Photo credits: Zerto.com

The i click on the checkpoint field to choose the date.

Photo credits: Zerto.com
Photo credits: Zerto.com

As mentioned the date can be choosen as well as a recovery can be performed from the latest backup.

Photo credits: Zerto.com
Photo credits: Zerto.com

You can also choose if you want to auto-commit, auto-rollback or none.

Auto-commit – Selecting Auto-Commit means that after a designated time (Default is 0 minutes), Zerto will commit the failover which promotes the failed over VMs to the new live production servers. Once the failover is committed, the DR servers will need to be failed back to production once the production site is restored to keep any changes made on the servers while failed over. To complete this, Reverse Replication will need to be enabled to replicate the changes from the target site back to the production site.

Auto-Rollback – The Auto-Rollback option allows you to designate a time after the Live Failover (Default 10 minutes) for the failover to be rolled back to production. This works similar to a Test Failover as you have a window to test your servers and applications and then undo the changes. This will also remove any changes that were made on the servers while at the DR site and does not require reverse replication.

Photo credits: Zerto.com
Photo credits: Zerto.com

NoneIf you set ‘None’ for the commit policy, you will have the option to either Rollback or Commit the failover later in time. This may be used in a situation where your production site is down, but could possibly be brought back online quickly. You have the option to commit the failover if you do not foresee a time production will be back online. However if the option is quickly fixed you can perform a Rollback.

After settings parameters in the “Execution Parameters” settings, the failover can start.

Photo credits: Zerto.com
Photo credits: Zerto.com

The sucessful failover test can be viewed on the dashboard. A move (or migration) is a more graceful operation than a failover since it is a planned outage It’s great for failbacks, preventive maintenance and site/hardware migrations. ZVM will gracefully powered down the VMs and then, as they are shutting down, grab the very latest copy of the data and use that instead of the journal. To move VPG, click on “actions” and “move VPG”

Photo credits: Zerto.com
Photo credits: Zerto.com

Then follow the same step by selecting the VPGs, but this time on the execution parameters, the VM need to be shutdown and click on “move”

Photo credits: Zerto.com
Photo credits: Zerto.com

After ZVR, has finished the commit and processed the VPGs, the move is done and we are back to the green circle which means the SLA has been met and the operation is successful.


Protecting Data and Applications with Zerto DRaaS

Zerto can be used to protect Data, Sites, Applications and Files. The best-in-class replication, orchestration and automation that ZVR provides is made by VPGs – Virtual Protection Groups. With Zerto, virtual machines are protected in  VPGs, which are a consistency grouping of VMs you want to protect and recover together. For example, a VPG for an application like Microsoft Exchange might include the VMs for the software, database and web server.

What is a VPG ?

  • Is complete application protection and recovery
  • VM and VMDK level consistency groups
  • Protects across servers and storage locations
  • Fully supports vMotion, Storage vMotion, HA and vApp
  • Journal-based point-in-time protection.
  • Works with Group Policy Protection
  • Has VSS Support

To create a VPG click on the VPG button which will list the VPGs from both the local and peer sites and provides summary details of each VPG. To create a new VPG, you have to click on the “New VPG” button.

Photo Credits: Zerto
Photo Credits: Zerto

This will bring you to the Create VPG wizard. Once you put a name for the new VPG click on next. Here is an example of the VPG wizard. On the VM’s tab, we are going to see a list of unprotected machine which is in the production site. Once you choose the VM, you click on the arrow in between and can also choose the boot order of each VMs. Then click next to move to the Replication tab.

Photo Credits: Zerto
Photo Credits: Zerto

The Replication tab covers details of the recovery/target site as well as the default value to use for the replication. If you have multiple site from the ZVM it can be selected in the Recovery Site option. The journal is a powerful feature. The journal is a dynamic record of every checkpoints in the history according to the values specify here. By default the value is one day and a journal is always on and stored on recovery site. If production is down, failovers are still possible by not writing changes locally first. The WAN traffic compression allows data to be compressed first before data is transmitted to the recovery site.

The ZVR journal is dynamic record of every checkpoint in a VM’s history. Checkpoints are inserted algorithmically and allow you to rewind to seconds, minutes or hours in the past to a max of 30 days. A journal is always on and only stored on the recovery site. If production is down, failovers are still possible and you also save storage space by not writing changes locally first.

Photo Credits: Zerto
Photo Credits: Zerto

The storage tab list the VM in the protection group and are associated with volumes details. If a VM is on thin provision during creation, ZVR uses that same thin provision or dynamic disk set up here by default. The “Edit Selected” button allows you to change this and to replicate swap disk if needed. Storage can also be moved from one datastore to another.

Photo Credits: Zerto
Photo Credits: Zerto

The recovery tab is for specifying defaults network and any post recovery scripts. You can specify the default recovery network and default recovery folder. For example:

Photo Credits: Zerto
Photo Credits: Zerto

The NICs tab allows you to specify specific network and IP settings for each of the recovery VMs. By default ZVR keeps the same MAC and IP addresses as the production site. So each VM need to be edited if  a different IP is needed.

Photo Credits: Zerto
Photo Credits: Zerto

The backup tab is turn off by default whereas the summary tab gives an overview of all the settings chosen.

Photo Credits: Zerto
Photo Credits: Zerto

You also create a repository for offsite backup. The repository is created by clicking on the Setup tab then on New repository.

Photo Credits: Zerto
Photo Credits: Zerto

As from here, you can click back on the backup tab from VPG and toggle the backup option ON.

Photo Credits: Zerto
Photo Credits: Zerto

Backup can also be run manually from the offsite backup menu. The offsite menu will appear once you activate it on the VPG backup menu.

Photo Credits: Zerto
Photo Credits: Zerto