You are currently on IBM Systems Media’s archival website. Click here to view our new website.

Bookmark and Share

Recent Posts

Another Case for Using the Command Line

May 12, 2009

Live partition mobility is a topic I've covered previously in an AIXchange blog post titled, " Getting Hands-On with Live Partition Mobility." More recently, Chris Gibson wrote a great Web exclusive article for IBM Systems Magazine titled, "Using the Command-Line Interface for LPM," that talks about performing live partition mobility migrations from the command line.

To make sense of articles like Chris', I like to take them to the lab. Basically I run through many of the same commands that he lists in his article. So if you read both his article and this post, you'll have two different perspectives of doing migrations from the command line on two different sets of blades.

I ran the commands that he provided and in my environment, I used two blades. (In the output below, my command line entries start with #. The output is on the next line.)

Blade 1:
#lssyscfg -r sys -F name

Blade 2:
#lssyscfg -r sys -F name

I have many partitions running on each blade, so I'll list only the VIOS partition on each blade (10-0BB8A and vios_server, respectively) and the partition (aix6san1) that I migrated:

Blade 1:
#lssyscfg -r lpar -F name,state

Blade 2:
#lssyscfg -r lpar -F name,state

Blade 1:
#lslparmigr -r lpar
name=10-0BB8A,lpar_id=1,migration_state=Not Migrating
name=aix6san1,lpar_id=6,migration_state=Not Migrating

Blade 2:
#lslparmigr -r lpar
name=vios_server,lpar_id=1,migration_state=Not Migrating

Chris explains that by using the LSLPARMIGR command with the proper parameters, we can learn some virtual adapter mappings that can be used during the migration. My source system (Server-7998-61X-SN100BB8) needs to know the server that's being migrated to (Server-7998-61X-SN1004DA) as well as its IP or hostname (blade12), the LPAR name that's migrating (aix6san1) and the appropriate attributes (suggested_virtual_scsi_mappings in this case).

#lslparmigr -r virtualio -t Server-7998-61X-SN1004DA --ip blade12
--filter lp ar_names=aix6san1 -F suggested_virtual_scsi_ mappings


Again, using commands Chris provided, I ran the command to verify that the migration would run, (-o v means to validate only; -t is the name of the destination managed system, --ip is the IP address or hostname of the HMC or IVM managing the destination system and --id is the ID of the partition on which to perform the operation). The command ran for a bit, and then returned no output. Using the echo $? command, we can see the return code, which confirms that the command successfully executed.

#migrlpar -o v -t Server-7998-61X-SN1004DAA --ip blade12 --id 6
#echo $?

By running the same command from before and changing the option –o v to –o m, I started the migration. And, using the techniques listed in Chris’ article, I could verify the successful migration of my LPAR.

# migrlpar -o m -t Server-7998-61X-SN1004DAA --ip blade12 --id 6

In one instance I migrated from one blade to the other, but didn't receive verification that it was ready to migrate back. I ran the command from the second blade, and the migration process hung. By using the –o r (recover) option, it was able to clear out the operation. (In one instance, I also had to use the --force parameter.)

As Chris states, whether you want to automate live partition mobility from the command line or manually perform a migration from the VIOS command line instead of using the GUI, scripts are a great option for AIX admins. Creating a script would allow you to use cron if, for instance, you want to move a partition at a particular time of day. This provides you with a predefined action that's ready to go; all you have to do is run the script and the partition will move. This can be much simpler than logging in and pointing and clicking on different GUI screens.

We are not Windows administrators. For the most part we do our work from command lines. While point-and-click can seem easier at times, it's still important to remember that most of the things you can do in GUI can also be done from the command line. There will be situations where running partition migrations directly from the command line makes the most sense.

Posted May 12, 2009| Permalink