Migrating an IBM i LPAR to Skytap

John Bradshaw
Skytap Customer Success Team
3 min readDec 27, 2019

--

Reproduced with permission from — https://bradshaw.cloud/2019/09/06/migrating-an-ibm-i-lpar-to-skytap/

If you thought <<insert here>> was difficult… Try IBM i. The best guide that I found for restoring IBM i LPARs is probably here or here but these are the steps you need to perform in Skytap to migrate your IBM i LPAR. If you’d like to have a go email me here and we can get you started.

Add Scratch Disks

Add sufficient disks to cover the size of the tapes (N.B. Disks cannot be larger than 1999GB, that’s an OS limitation not a Skytap one). In the example below I’ve created four 300GB drives, the first two are for ASP02 where the data/app will live. The remaining two drives should be configured as ASP03, we’ll use this as the scratch disk to copy the Virtual Tapes onto. Once the restoration is complete we can just remove ASP03 and delete the disks in Skytap.

Get the LPAR to recognise the disks

We need to boot (or IPL in IBM i speak) into Dedicated Service Tools mode (DST). Enter the following command:

WRKSYSVAL QIPLTYPE

Change to option 1: Attended IPL with dedicated service tools. Accept changes.

CHGDSTPWD *DEFAULT
PWRDWNSYS *IMMED RESTART(*YES)

Wait for it to boot to DST. Now follow the IBM instructions here to format the disks into two new ASPs. NOTE: This process currently takes hours depending on the disk size you intend to add.

After adding drives, set QIPLTYPE back to 0 by following steps above

Moving Files

Create the scratch directory

CRTDIR DIR(‘/MYFS’)
CRTDIR DIR(‘/MYFS/RESTORE’)
WRKSYSVAL

and change

QJOBMSGQFL to *WRAP

This wraps the log file, otherwise, it can fill up and crash the box.

Mount the scratch ASP
ADDMFS TYPE(*UDFS) MFS('/DEV/QASP03/QASP03.UDFS') MNTOVRDIR('/MYFS/RESTORE')

Create the virtual tape device

CRTDEVTAP DEVD(TAPV01) RSRCNAME(*VRT)
WRKDEVD DEVD(TAPV01)

Select option 8

Select option 1

Create the image catalog

CRTIMGCLG IMGCLG('VTAPOL01') DIR('/myfs/scratch') CRTDIR(*NO) IMPORT(*NO) TYPE(*TAP)

Load image catalog entries

Load each image file as an entry one by one

ADDIMGCLGE IMGCLG('VTAPOL01') FROMFILE('/myfs/scratch/imagename') TOFILE(*FROMFILE) TEXT(*GEN)

Load the image catalog

LODIMGCLG IMGCLG('VTAPOL01') DEV(TAPV01)

Restore data

ENDSBS SBS(*ALL) OPTION(*IMMED)
RSTUSRPRF USRPRF(*ALL) DEV(TAPV01)

WRKUSRPRF USRPRF(QSECOFR)

  • Reset the QSECOFR password as it will have been changed

RSTLIB SAVLIB(*IBM) DEV(TAPV01) ENDOPT(*LEAVE) MBROPT(*ALL) ALWOBJDIF(*ALL)

RSTLIB SAVLIB(*ANY) DEV(TAPV01) ENDOPT(*REWIND) MBROPT(*ALL) ALWOBJDIF(*ALL) FRCOBJCVN(*NO) OMITOBJ((QOFC))

ENDSBS SBS(*ALL) OPTION(IMMED)

RCLDLO DLO(*ALL) RSTDLO DLO(*ALL) DEV(TAPV01) ENDOPT(*LEAVE) ALWOBJDIF(ALL)

RST DEV('/QSYS.LIB/TAPVO1.DEVD') OBJ(('/') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT)) ENDOPT(*REWIND) ALWOBJDIF(*ALL) OPTION(*NEW)

RSTAUT

Post Restore

Remove the additional ASP (in our case ASP03) by going back into DST

– Re-IPL (reboot) a few times to make sure everything is working –

PWRDWNSYS *IMMED RESTART(*YES)

Rebalance the ASPs using STRASPBAL

STRASPBAL ASP(1) TIMLMT(*NOMAX) TYPE(*CAPACITY)

Now shut down the LPAR, remove the two disks that made up ASP03, and then save a template.

Finished!

You’re now good to go with a fully functional, cloud-based IBM i LPAR running in Skytap!

Remove the additional ASP (in our case ASP03) by going back into DST

Originally published at https://bradshaw.cloud.

--

--

John Bradshaw
Skytap Customer Success Team

Director of Cloud Computing Technology and Strategy EMEA @akamai