Edit: This is still a useful method to know about.
Originally posted January 19, 2010 on AIXchange
Last week I noted that the soon-to-be completed IBM Redbook, “PowerVM Migration from Physical to Virtual Storage,” lays out the available options for migrating to virtual storage.
In chapter 2 of the Redbook, the authors provide what they call “core procedures”:
“There are a number of core procedures that are used in multiple scenarios of the accompanying chapters. These procedures have been documented fully in this chapter and provide additional notes about the procedures that will not be found in the fully worked through examples in subsequent chapters. Some of the additional notes are about issues such as best practices and some are additional diagnostic methods that may be used.”
“The core procedures are:
Using File Backed Optical devices to perform a restoration
Checking unique disk identification – IEEE, PVID and UDID
Creating a virtual SCSI device
Using virtual Fibre Channel and NPIV”
Having written about file-backed optical storage in the past (here, here and here), this section in particular piques my interest.
As noted in the Redbook: “File Backed Optical devices provide a clean, easy-to-use mechanism to take a backup of either a root or data volume group and restore it to a target device.”
By entering the mkcd command on your source system and then moving the resulting .iso image over to your VIO server, you can boot from this virtual optical device.
Back to the authors:
“To make image files, there are two methods that will be detailed: Using the AIX smitty mkcd command, or the mkcd command line from an AIX shell. Choose whichever method that is appropriate for your environment.”
Rather than run mkcd on the command line, I ran smitty mkcd and answered no when the system prompted me with, “Use an existing mksysb image?”
+————————————————————————–+
| Use an existing mksysb image? |
| |
| Move cursor to desired item and press Enter. |
| |
| 1 yes |
| 2 no |
| |
| F1=Help F2=Refresh F3=Cancel |
| F8=Image F10=Exit Enter=Do |
| /=Find n=Find Next |
+————————————————————————–+
Then I gave it the filesystem in which to store the mksysb image, the CD file structure, and the final CD images:
Back Up This System to CD
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
CD-R Device [] +
mksysb creation options:
Create map files? no +
Exclude files? no +
Disable software packing of backup? no +
Backup extended attributes? yes +
File system to store mksysb image [] /
(If blank, the file system
will be created for you.)
File system to store CD file structure [] /
(If blank, the file system
will be created for you.)
File system to store CD file structure [] /
(If blank, the file system
will be created for you.)
File system to store final CD images [] /
(If blank, the file system
will be created for you.)
Finally, I selected:
Advanced Customization Options:
Do you want the CD to be bootable? Yes
Remove final images after creating CD? No
Create the CD now? No
I hit enter and it created my .iso images:
673570816 cd_image_344258.vol1
676298752 cd_image_344258.vol2
676298752 cd_image_344258.vol3
676298752 cd_image_344258.vol4
20981760 cd_image_344258.vol5
I copied the cd images to my target system and then ran my loadopt command as padmin.
$loadopt -disk cd_image_344258.vol1 -vtd vtopt1
$lsmap –all
VTD vtopt1
Status Available
LUN 0x8200000000000000
Backing device /var/vio/VMLibrary/cd_image_344258vol1
The LPAR booted as expected from the mksysb, and I ran through the restore exercise just to verify that everything worked as expected.
This mkcd command is incredibly handy when you’re building a machine. Maybe it’s not on the network yet. Maybe there’s no NIM server available. No problem. Just make some .iso images and boot from the virtual optical media.
I will plan to revisit topics from this Redbook in a future post, so stay tuned.