Power Virtual Server

 View Only

IBM i on PowerVS: Snapshots, Image Capture and Volume Clones

By Ricardo Martins posted Sun November 17, 2024 12:13 PM

  

Hello everyone.

Whenever we want to search for something technical related to IBM i, is not always easy to find it, to say the least.

Regarding IBM i on IBM Cloud, IBM Cloud Docs are a great starting point and you have a lot of information there, but again if you try to search it, well, you might be disappointed with the results sometimes, even regarding PowerVS searches.

Just to give one example, if you want to know more about PowerVS snapshots, and you go to IBM Cloud Docs and search for the obvious “PowerVS snapshots”, I get 492 results in 50 pages, I did not went through all 50 pages, but in the first two pages none of the results are related to PowerVS, the first one comes on page three and it is about AIX and not really about “how to” snapshots. Don’t get me wrong, the information/docs are there, but sometimes is easier to find it by googling it. Googling “PowerVS snapshots” and the first result is the one you will need to start with snapshots https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-snapshots-cloning

For those of you with IBM i LPARs/VSI on IBM Cloud or thinking of having IBM i LPARs/VSI on IBM Cloud, this is my first two cents.

There are several ways to do backups on IBM Cloud, but that, if my scarce free time lets me, is another subject for another day…

For my first blog ever, today I am here to talk just a bit about three amazing PowerVS options for IBM i, and my bash script bluexport.sh.

I made this script for me and my team easiness, but decided to share it for those of you that like me are not developers, or even knowing a bit of this and that, do not have too much time to develop.

Feel free to criticize it, change it, improve it, migrate it to another computer language…

The three options I’m talking about are:

  • Instance Snapshots
  • Image Capture & Export
  • Volume Clone

Some uses cases:

1. When you must do an OS upgrade, or you are going to do a PTF Cum and/or Groups update, or you are going to do some major change like i.e., encrypt an iASP.

Do Snapshots!

2. You want to create a Quality Assurance or a Test LPAR with the Production LPAR data in the same Workspace or in another Workspace. Or you just want to have a “full backup” in some other place than PowerVS.

Do an Image Capture & Export! (LPAR/VSI must be less than 10TiB in size)

Or a Volume Clone if you want to deploy on the same Workspace.

3. You want to have a local “full backup” i.e., every hour.

Do Snapshots!

For the first use case, whether you are doing it in your own LPAR/VSI or in your customer’s LPAR/VSI, PowerVS has this amazing option, to make our work stress free and risk free, and that option is… yes you guessed it Instance Snapshots!

How? Before you start doing your work, if it is a Production LPAR/VSI it will most probably be after business hours, you make an LPAR/VSI snapshot or, like it is called on IBM Cloud, an Instance snapshot.

Then you do your work, and if by some reason your work goes south, well no worries, just power down the LPAR/VSI, do the Instance snapshot restore, IPL it and that's it, that easy, all running as before… well yeah you lost most probably the night, and you will have to do your work again… but at least the LPAR/VSI is running and you won't have to spent more hours trying to fix or undo your work or even to eventually have to restore a full backup and some daily ones, and have your customer over your shoulders like a kid in a car “are we there yet?” 😎 You can go to sleep and worry about what went wrong the next day with a fresh mind.

And now you ask, how can I do an Instance snapshot?

Well not through the GUI, not yet at least. You must do it through the IBM Cloud CLI or through API, and you must not forget to quiesce the memory to the ASPs and iASPs with the CHGASPACT command right before the Instance Snapshot, the Image Capture or the Volume Clone.

The Instance snapshots are fairly quick, depending of course on the LPAR/VSI size.

For use case number 3, Instance snapshots are also great, as they can serve as a “SAVE 21”, and unlike the real SAVE 21 which can take hours, the snapshots take minutes. Depending on the size of your LPAR/VSI you can even make an hourly snapshot for example.

So, how can you do that every hour? With automation of course.

And here is where my bash script bluexport.sh can help. This script allows you to run it on a Linux crontab or run it on screen before your work and let it make the quiesce and the snapshot immediately after for you.

Still on use case number 3, my thought was on those smaller customers, where every penny counts. With this bash script you do not have to have an Ansible tower or something like that and learn how to do it. With bluexport.sh you just need a very small VM or a container that can run bash scripts and of course must have access to the IBM Cloud endpoint. You can have i.e., one small Linux VM on VPC or in your office.

If you have at your office one PC that can talk with the IBM Cloud endpoint and the LPARs/VSIs you can run it, even from WSL Linux on Windows.

i.e. For use case number 1, when you go do your work you can run it from your Linux or Windows laptop.

Now let's talk about Image Capture & Export and Volume Clone in PowerVS.

Image Captures, unlike snapshots, can be Exported and that makes it a great way i.e., to migrate your LPAR/VSI from one Workspace to another, or a simple way to have a “full backup" of the LPAR/VSI in Cloud Object Storage.

Image Captures are also fairly quick to do, and like snapshots, can be done with the LPAR/VSI running and without interruption.

Image Captures are limited to <10TiB, so to be able to do an Image Capture your LPAR/VSI as to be less than 10 TiB in size.

On the other end, the Image Export can take hours to a couple of days depending on the size of the LPAR/VSI.

It is not so much the upload, is that the image has to be “converted” into ‘. OVA’ and then compressed before is sent to Object Storage, and these two steps take a while depending on the size of the LPAR/VSI. But let me tell you, a 6TiB LPAR with between 50-60% occupation, after the compress the image can be as small as ~600GiB or less.

When you deploy a full Image Capture of one of your LPARs/VSIs, you deploy your source LPAR/VSI to another new LPAR/VSI including all the data on all the ASPs and iASPs. The only thing that is not deployed is the CFGTCP data, IPs, routes and host tables.

So, for use case number 2, Image Capture is perfect, again considering your LPAR/VSI is less than 10 TiB in size.

Still in use case 2, if you are deploying your new LPAR/VSI into the same Workspace, you can also do Volume Clone, but unlike the Image Capture, with the Volume Clone you will get everything from source LPAR/VSI into the new LPAR/VSI including the network data (CFGTCP, IPs, …). 

Volume Clone can not be exported! But they can be replicated by GRS to the respective Data Center. You can see the DC pairs here.

If you do a Volume Clone or an Image Capture manually do not forget to quiesce the memory to the ASPs and iASPs with the CHGASPACT command right before the Cloning or the Capture.

My bluexport.sh script is a great help for you to do the Image Captures and the Exports to Cloud Object Storage, or to do the Snapshots and the Volume Clones, and you will have in its log all the steps taken and how long they have taken. With my script you don’t need to worry about the CHGASPACT, the script will do it for you.

What are the key differences between a snapshot and a clone? (1)

The key differences are as follows:

(1)              Source: https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-powervs-faqs#snap-vs-clone

Whether or not you take advantage of my script, please do take advantage of these three wonderful options. They are there to make our lives easier!

0 comments
17 views

Permalink