Skip to content


List the State of Etherchannel Elements

Lately, I am busy with EtherChannel devices. This requires a lot of talking between us (the AIX admins) and them (LAN admins) as the ports used by the EtherChanneled adapters need to be set appropriately to support this technology. During this process it is important to know the state of all network adapters assigned to the given EtherChannel adapter. An adapter which cannot communicate with a port/switch could indicate a port which has not been set or which attributes are wrong or it could indicate cabling issues. The slight modification to the script from the previous post shows the state of every NIC used by a given EtherChannel “adapter”.

MarcoPolo:CSH:/root>cat ethState.ksh
#!/usr/bin/ksh

## W.M Duszyk 09/01/10
## Check the state of each individual adapter
## of the host EtherChannel adapter
##

for adapter in `lsdev | grep EtherChannel | awk '{print $1}'`
do
entstat -d ent6 | egrep "ETH|Device Type|Link State|Link Status|Media"
print "\n"
done

Look bellow, one of NIC’s is “bad” (or maybe the port/VLAN has not been set correctly?).

MarcoPolo:CSH:/root>./ethState.ksh
ETHERNET STATISTICS (ent6) :
Device Type: EtherChannel
ETHERNET STATISTICS (ent0) :
Device Type: Host Ethernet Adapter (l-hea)
Logical Port Link State: Up
Physical Port Link State: Down
Media Speed Selected: 1000 Mbps / 1 Gbps, Full Duplex
Media Speed Running: 1000 Mbps / 1 Gbps, Full Duplex

ETHERNET STATISTICS (ent4) :
Device Type: 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
Link Status : Up
Media Speed Selected: 1000 Mbps Full Duplex
Media Speed Running: 1000 Mbps Full Duplex
ETHERNET STATISTICS (ent1) :
Device Type: Host Ethernet Adapter (l-hea)
Logical Port Link State: Up
Physical Port Link State: Up
Media Speed Selected: 1000 Mbps / 1 Gbps, Full Duplex
Media Speed Running: 1000 Mbps / 1 Gbps, Full Duplex

Looking at the output above we can see that the EthernetChannel adapter is ent6. Its components are ent0, ent4 and ent1. The first and the last adapter is LHA based and the last one comes from from a 2-Port adapter card.

Posted in AIX, Real life AIX.

Tagged with , , , , , .


Checking EtherChannel Adapter

One of the benefits of working in a group of administrators is the fact that this has the potential to produce more “ideas” in your head than if you were the only one admin. Today, I have heard Annwoy working the phone with someone in one of our data centers testing EtherChannel connectivity on one of his AIX machines.

Somehow, this generated a “litte voice” in my brain that made me check the state of the EtherChannel adapter on a box I set up and tested two days ago. Thanks for the “voice”, the idea, the group! I found that the network communications were going over the backup adapter…. Not over the EtherChannel (consisting of two LAN adapters – one LHA and one stand alone NIC) but over the backup adapter!

If you use EtherChannel technology and have problems scripting, you may find the next few lines useful. This script will find EtherChannel device and it will produce the state of its components.

MarkD:CSH:/usr/local/bin>cat lsetch.ksh
#!/usr/bin/ksh

## W.M Duszyk 09/01/10
## Check the state of host EtherChannel adapter
##

for adapter in `lsdev | grep EtherChannel | awk '{print $1}'`
do
      entstat -d $adapter | egrep "Active|Backup|Link Status|ETH"
      print "\n"
done
####EOS



In the examples bellow, ent6 is the EtherChannel adapter built with adapters ent0 and ent4. The backup adapter is ent1.


Here, everything is the way it should be – EtherChannel adapter is the communication adapter.


ETHERNET STATISTICS (ent6) :
Active channel: primary channel
ETHERNET STATISTICS (ent0) :
ETHERNET STATISTICS (ent4) :
Link Status : Up
Backup adapter - ent1:
ETHERNET STATISTICS (ent1) :



Here, the Backup Adapter is the communication adapter – EtherChannel does not work!


ETHERNET STATISTICS (ent6) :
Active channel: backup adapter
ETHERNET STATISTICS (ent0) :
ETHERNET STATISTICS (ent4) :
Link Status : Up
Backup adapter - ent1:
ETHERNET STATISTICS (ent1) :



Now, I have to get in touch with one of our Network Engineers to check the switches/ports this EtherChannel is attached to….

Posted in AIX, Real life AIX, Tagged with , , , , , , , , , , .


WPAR Mobility – step by step

For this example, I did not create a ”checkpointable” wpar as its relocation will be done by me – the AIX administrator, not by the AIX itself. Also, no wpar/application state data will be preserved. The wpar will be shutdown on one lpar and started on another lpar.

Before something can be moved, it has to be already created. At the current date, for a wpar to be ”relocatable” it has to be built of components that are accessible to all lpars. Currently this components are provided by NFS only. So with this in mind, we have to create a wpar with its rootvg ”staff” located in NFS file systems.

On the NFS server, create file systems for wpar rootvg:

NfsServer:/>crfs -v jfs2 -m /rootWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /varWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /homeWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE
NfsServer:/>crfs -v jfs2 -m /tmpWpar1 -g WparVG –u testWpar –A yes –a size=1G -a log=INLINE

where:
“-u testWpar” associates file system with a mount group
“-A yes” makes it mountable automatically at boot
“-a size=1G” sets its size to 1GB
“-a log=INLINE” gives it an INLINE log

Next, mount them all and finally set them for NFS export with root access by the SourceLpar its testWpar and finally the TargetLpar that will receive relocated testWpar. This is important – all three entities need it for relocation to work. Finally, login to the SourceLpar where you will make/start the wpar.

SourceLpar:/root>mkwpar -n testWpar -N interface=en0 address=159.14.245.89 netmask=255.255.255.0 -r\
-M directory=/ vfs=nfs host=NfsServer dev=/rootWpar1 \
-M directory=/var vfs=nfs host=NfsServer dev=/varWpar1 \
-M directory=/home vfs=nfs host=NfsServer dev=/homeWpar1 \
-M directory=/tmp vfs=nfs host=NfsServer dev=/tmpWpar1

…..............................
…..............................
rsct.core.hostrm            2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.lprm              2.5.4.0         ROOT        APPLY       SUCCESS
rsct.core.lprm              2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.microsensor       2.5.4.0         ROOT        APPLY       SUCCESS
rsct.core.microsensor       2.5.5.0         ROOT        APPLY       SUCCESS
rsct.core.gui               2.5.5.0         ROOT        APPLY       SUCCESS
syncroot: Error synchronizing installp software.
syncroot: Returns Status = FAILURE
Copying network name resolution configuration...
/etc/resolv.conf
/etc/hosts
/etc/netsvc.conf
Workload partition testWpar created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root: s
SourceLpar:/root> mkwpar -w -o testWpar.spec -e testWpar
SourceLpar:/root> lswarp
ksh: lswarp:  not found.
SourceLpar:/root> lswpar
Name      State  Type  Hostname  Directory        RootVG WPAR
--------------------------------------------------------------
testWpar  D      S     testWpar  /wpars/testWpar  no
SourceLpar:/root>

Regardless, of one error message the new wpar starts without problems. After clogin, I check it file systems, etc…

# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
NfsServer:/rootWpar1      1.00      0.95    6%     3032     2% /
NfsServer:/homeWpar1      1.00      0.99    1%        5     1% /home
Global             0.50      0.31   39%     8705    11% /opt
Global                -         -    -         -     -  /proc
NfsServer:/tmpWpar1      1.00      0.99    2%       13     1% /tmp
Global             4.44      0.37   92%    43855    31% /usr
NfsServer:/varWpar1      1.00      0.92    9%     4358     2% /var

Since, I did nor create wpar “spec” file while creating the wpar, I have to do it now. How? Executing mkwpar -e testWpar wpar1 -o /tmp/testWpar.spec -w. The testWpar.spec specification file is copied to the target lpar where the wpar is ”recreated” but it is not started! See the next line.

targetWpar:MDC:/root>mkwpar -p -f testWpar.spec
mkwpar: Creating file systems...
/
/home
/opt
/proc
/tmp
/usr
/var
Workload partition testWpar created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root: startwpar [-v] testWpar

Finally, I am ready to stop my wpar in its original lpar. Wpar is DOWN in it ”home”, now I will start/relocate it to the target lpar.

targetWpar:MDC:/etc>startwpar -v testWpar
Starting workload partition testWpar.
Mounting all workload partition file systems.
Mounting /wpars/testWpar
Mounting /wpars/testWpar/home
Mounting /wpars/testWpar/opt
Mounting /wpars/testWpar/proc
Mounting /wpars/testWpar/tmp
Mounting /wpars/testWpar/usr
Mounting /wpars/testWpar/var
Loading workload partition.
Exporting workload partition devices.
Starting workload partition subsystem cor_testWpar.
0513-059 The cor_testWpar Subsystem has been started. Subsystem PID is 5570670.
Verifying workload partition startup.
Return Status = SUCCESS.

Wpar came alive. This is nice, very nice indeed. Not that I am suprised that it worked, I knew it will work. This just opens a whole new chapter in AIX. OK, now let’s stop it on the target and put it back where it belongs.

targetWpar:MDC:/etc>stopwpar -F -v testWpar
Stopping workload partition testWpar.
Stopping workload partition subsystem cor_testWpar.
0513-044 The cor_testWpar Subsystem was requested to stop.
Shutting down all workload partition processes.
WPAR='testWpar' CID=1
ID=9 KEY=0x62000086 UID=0 GID=0 RT=-1
wio0 Defined
Unmounting all workload partition file systems.
Umounting /wpars/testWpar/var.
Umounting /wpars/testWpar/usr.
Umounting /wpars/testWpar/tmp.
Umounting /wpars/testWpar/proc.
Umounting /wpars/testWpar/opt.
Umounting /wpars/testWpar/home.
Umounting /wpars/testWpar.
Return Status = SUCCESS.
targetWpar:MDC:/etc>lswpar
Name        State  Type  Hostname    Directory          RootVG WPAR
--------------------------------------------------------------------
testWpar    D      S     testWpar    /wpars/testWpar    no
vioprfp1n6  D      S     vioprfp1n6  /wpars/vioprfp1n6  yes
vioprfp1n7  D      S     vioprfp1n7  /wpars/vioprfp1n7  no

I bet you remember how to start wpar?

At night, I had a dream and in my dream I observe myself moving wpar based on SAN. The source and the target lpars as well as the wpar FC adapters and the wpar LUNs are zoned appropriately to provide access………. . Maybe one day?

Attention: Jay Kruemcke from IBM says that “AIX supports WPAR mobility with SAN devices since AIX 6.1 Technology Level 4 in October 2009″. Jay, thank you a bunch for your comment!

I think, all you need to do is to zone the WPAR LUN or LUNs to both the SourceLpar and the TargetLpar – the reset should be the same as with NFS based wpar. If I have enough time, I will try it tomorrow.

Posted in Real life AIX.

Tagged with , , , , , , , , .


Why NPIV cannot be like LHEA?

A simple question: why VIO Server is required for NPIV but not for LHEA?

Posted in Real life AIX.

Tagged with , , , , .


wpar disks – their serious weakness does not exist….

Be aware, I just found that the issues this post describes are resolved with AIX 6.1.6 to be released on 9/16/2010!!!!!

I was one happy AIX administrator – at least till this morning. I liked my job, I liked my OS (AIX), and my only worry was my kid moving away to a college.
Recently, I build some wpars and was able to put one into a real use. All wpars were built using SAN attached storage (in my case via SVC) through a dedicated FC adapters.

Last Friday, I needed to relocate the rootvg of both the lpar and its wpar from SAN disk to a virtual scsi ones. So I build a vio server and all the virtual scsi infrastructure and delivered two virtual scsi disks to the lpar via its own vscsi adapters. Migrating lpar rootvg was an easy an uneventful job – nothing really to write home about.

The turn from a happy AIX administrator to a bewildered one took place trying to pass a vscsi disk to a wpar. This is what happen trying to assign hdisk13 to wpar called wmdWpar:

MarkLpar:RDC:InfoPROD:/root>chwpar -D devname=hdisk13 devtype=disk wmdWpar
**********************************************************************
ERROR
chwpar: 0960-587 hdisk13 has un-supported subclass type.
**********************************************************************
MarkLpar:RDC:InfoPROD:/root>

I tried, and tried, and finally I called for IBM support which delivered the painful blow stating that “Database searches show the following:

You cannot allocate Virtual SCSI disks to a WPAR. Only direct-attached fibrechannel disks are supported. If you try to allocate Virtual SCSI disks you will get the following error:

chwpar: 0960-587 hdisk# has un-supported subclass type.

It’s the same for Virtual FC disks. If you shutdown the VIO you loose your connection to the disks, since it’s not direct-attached. Note: mapped SAN disk from VIO is not supported. Also SVC is not supported. Only direct-attached fibrechannel disks are supported.

For as long as I remember, a disk was always “just a disk”. AIX did not care if the disk was a SCSI, SSA, SATA, SAS or SAN. A disk had its PVID and this was it. Now apparently this is not longer a case…….. Even SVC delivered disk is “no good” which is a bit funny as SVC is an excellent SAN product also made by IBM.

I really hope this is not true and there is a way out. If not, I hope this “issue” will be resolved in AIX7, it is time to download the trail version and see what it is all about…..

One more thing. So far,  I had no issues with my wpars and their disks delivered via SVC + SDDPCM combination …….

ATTENTION!!!!!!!!
The good people in IBM have took care and what I just said above is not an issues with AIX 6.1.6 and above!!!!! My lpar/wpar is at AIX 6.1.4 – let suma and upgrade this pair and see if the vscsi disks can be passed to its wpars.

As this exercise proofs – trust no one, not even support. The are just people like you not gods.

Posted in Real life AIX.

Tagged with , , , , , , , , , , , .


my lpar boot always ends in SMS

It just keeps giving….. My latest task  (to set up a SAN based VIOS + LAPARs/WPARs) seems to be never ending source of posts. Now, this one – every time I execute shutdown -force -restart the lpar which houses my VIOS ends up in SMS menu. How annoying this can be, I only know! Well, I cannot blame anybody but myself – my kid is leaving for collage and I cannot really focus. Too many changes! Just a few more days, and she will leave the house. Maggie will be only a walk away in Swarthmore. Hopefully, we will be able to see her as much as we would like to.

To make the long story short. As long as the SMS  Multiboot Startup mode is set ON the given partition will always end its boot in SMS. Yes, it does not matter how the lpar is set in HMC – SMS setup takes the precedence!

So, I waited for my lpar again to end in SMS but this time I made sure to change ON to OFF (to disable the Multiboot Startup mode):

PowerPC Firmware
Version EL350_039
SMS 1.7 (c) Copyright IBM Corp. 2000,2008 All rights reserved.
-------------------------------------------------------------------------------
Multiboot
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup <OFF>

Now, after executing shutdown -force -restart, the VIOS comes to the login prompt – it does not end up in SMS. My life is getting better.

Posted in Real life AIX.

Tagged with , , , , , , .


MultiPort Network Adapters

Today, working with my VIO Server, I noticed that somehow I managed to erase from my memory this important little fact about the mutli port network adapters. I am talking about the “4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)” and its two ports variant as well.  After execution of smitty chgenet and selection of the appropriate port, you have to slide down the window to the very bottom of the page to see the last option – Enable failover mode screen shot. Here you have three options as described calling in this field for smitty help (F1).

Smitty help screen says:  You can select “primary“, “backup“, or “disable“. Select “primary” if the port will act as the primary port in a failover configuration for a 2-port gigabit adapter. Wybierz “backup” if the port will act as the backup port in a failover configuratin for a 2-port gigabit adapter. Select “disable” if the port is not a member of a failover configuration. The default setting is “disable“.

It means that port of this adapter can be designated as the “primary” and the second port as the “backup” of the first one or select “disable” for the both ports when they are used as an EtherChannel… Isn’t this something worth remembering about?[/lang]

Posted in AIX, VIO, Real life AIX.

Tagged with , , , , , .


bootp is not working, really?

This post shows “how to set AIX machine to watch bootp traffic in real time”.

For example, to check if bootp requests are reaching NIM server do:

Open a second login session with your NIM server. Move back to the first one, and remove resources from a specific NIM client (in this case lowimpactvio1) definition from the NIM server database.

nim -Fo reset lowimpactvio1
nim -o deallocate -a subclass=all lowimpactvio1

Next, I edit the /etc/inetd.conf to comment out the bootp service which I follow with halting this service executing the stopsrc -t bootps.

Still, it could be that the bootp lingers around. Check if it is running and kill it, if it is.

NimMaster:/etc>ps –ef | grep bootp
root 250082 204926 0 Feb 09 - 0:45 bootpd /etc/bootptab
root 438342 729162 1 08:32:11 pts/1 0:00 grep bootp
NimMaster:/etc>kill -9 250082
NimMaster:/etc>ps -ef | grep bootp
root 438346 729162 1 08:32:22 pts/1 0:00 grep bootp

In the second session, execute the following command bootpd -d -d -d -d –s. Return to the first session and re-define the same NIM client you removed earlier. Check the /etc/bootptab, execute lsnim – l on this client. Verify that the new NIM client definitions are all OK. Go to the client’s SMS screen verify its IP definitions (address, NIM server, gateway, netmask, etc) and start the installation process.

In the second session window on the NIM server, you should see bootp packets. If you do not see the ones from the NIM client than either IP addresses are wrong or the bootp is blocked somewhere between these two hosts.

Bellow you can see an excerpt from the screen of my NIM server showing the bootp packets from its client, so all is OK and the install will proceed as planed.

BOOTPD: The following addresses are included in the bootp reply
BOOTPD: Client IP address (bp->bp_ciaddr) = 159.14.245.71
BOOTPD: Server IP address (bp->bp_siaddr) = 159.14.27.53
BOOTPD: Gateway IP address (bp->bp_giaddr) = 159.14.245.254
BOOTPD: Finished processing boot request.
BOOTPD: bootptab mtime is Tue Aug 17 08:34:46 2010
BOOTPD: Received boot request.
BOOTPD: request from IP addr 159.14.245.71
BOOTPD: found 159.14.245.71 lowimpactvio1
BOOTPD: bootfile = /tftpboot/lowimpactvio1
BOOTPD: vendor magic field is 99.130.83.99
BOOTPD: RFC1048 vendor data ( bp_vend[64] )
99.130.83.99.1.4.255.255.255.0.3.4.159.14.245.254.255.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.BOOTPD: sending RFC1048-style reply
BOOTPD: The following addresses are included in the bootp reply
BOOTPD: Client IP address (bp->bp_ciaddr) = 159.14.245.71
BOOTPD: Server IP address (bp->bp_siaddr) = 159.14.27.53
BOOTPD: Gateway IP address (bp->bp_giaddr) = 159.14.245.254
BOOTPD: Finished processing boot request.

When the packets start flowing and the install starts – do not forget to remove the comment from the bootp line in /etc/inetd.conf of NIM Server and restart its bootpd service with the startsrc -t bootps.

This morning, I had issues installing a VIO server via NIM. I believed it to be bootp related -bootp packets being filtered by a router (somehow it is always soo very difficult to blame myself …). So I put the show above for my network Admins to prove that it is their “evil” fault, just to have them laughing at me in my cube – I used a wrong address for the NIM server (wrong subnet) while setting the client SMS boot…….. – what a silly me, indeed!

Posted in AIX, Real life AIX.

Tagged with , , , , .


Yet another VIOs Installation guide

Follow this link to a German WIKI page with a step by step + screen shosts VIOS installation procedure.

http://oss.gonicus.de/openpower/index.php/IBM_VIO_Server

Posted in AIX, VIO.

Tagged with , , , , , , , .


Diagnosing Oracle/AIX Performance Issues

Very fresh document, which has potential to make few administrators happier…
Diagnosing Oracle® Database Performance on AIX® Using IBM® NMON and Oracle Statspack Reports

Posted in AIX, Real life AIX.

Tagged with , , , , , .


backing up wpars

I have to modify my existing wpar environment. I have to create a new file system in its rootvg and I have to implement a system to back it up – to backup the lpar that owns wpar (soon more wpars). Rigth, now there is still one wpar in this lpar.

InfoPROD:/>lswpar
Name State Type Hostname Directory RootVG WPAR
-----------------------------------------------------------------------
infaprtu001 A S infaprtu001 /wpars/infaprtu001 yes

Look at the wpar’s file systems as they are shown on its owner (lpar) side:

/dev/informatica_lv 73400320 73101776 1% 4 1% /informatica
/dev/cda_lv 1048576 1039568 1% 4 1% /cda
/dev/ilmstage_lv 209715200 208863440 1% 4 1% /ilmstage

/dev/fslv00 196608 103480 48% 2522 18% /wpars/infaprtu001
/wpars/infaprtu001/dev/hd4 196608 103480 48% 2522 18% /wpars/infaprtu001/
/wpars/infaprtu001/dev/hd2 11272192 2241528 81% 45833 16% /wpars/infaprtu001/usr
......................

The listing above, shows that wpar file sytems from its infoTST_vg are mounted as they were lpar’s “local” file systems. I belive this is the case because I created them in the wpar, not in their lpar. Now, when I need to create an new file system in this wpar rootvg, I will create it from the lpar side not from within wpar.

InfoPROD:/>crfs -v jfs2 -g rootvg -m /wpars/infaprtu001/opt/IBM/ITM \
-u infaprtu001 -a logname=INLINE -a size=1G
File system created successfully.
1040148 kilobytes total disk space.
New File System size is 2097152

The new file system is immediately mounted in its wpar and its owner dlpar. The last command added this stanza to lpar /etc/filesystems

/wpars/infaprtu001/opt/IBM/ITM:
        dev = /dev/fslv02
        vfs = jfs2
        log = INLINE
        mount = false
        type = infaprtu001
        account = false

In wpar /etc/filesystem we now also have:

/opt/IBM/ITM:
        dev = /dev/ITM_lv
        vfs = jfs2
        log = INLINE
        mount = true
        account = false

I needed this file system do install some software. And now let think about backups for this environment. What I know now (subject to a change) is that for a wpar like I have, to back it up i have to backup its components separately. First I need to backup its configuration and it own rootvg – executing the savewpar command. Second, I need to backup its data volume group (infoTST_vg). The lpar also needs to have its mksysb backups. So for the lpar and its wpar I need two mksysb backups and I need two backups of the data volume groups. The second pair of backups is not included in this post.

In this regard, I created inside the owner’s lpar rootvg a file systems called /mksysbimg where I will deposit its own mksysb image and wpar own savewpar image – both created once a week via cron and picked up by dsmc (backup command). This file system is big enough to fit only one backup image at a time, so after the msysb image is transfered to TSM it is deleted and the savewpar image is created, transfered to TSM and finally deleted too.

The savewpar command uses the /tmp/wpardata to store wpar information required to generate wpar’s backup image – there should be enough room in /tmp to store the generated info especially when many wpars are to be backed up in sucession. I have to test it before using in production, but I belive that the following few lines will do the job.

for wpar in `lswpar -c | grep -v '#name' | awk -F ':' '{print $1}'`
do
    rm -f /mksysbimg/* 2>/dev/null
    rm -f /tmp/wpardata/* 2>/dev/null
    /usr/bin/savewpar -f /mksysbimg/$wpar.bak $wpar
    if [ $? -ne 0 ]; then
      echo "Error: $wpar savewpar failed" | MAIL
    fi
dsmc incr /mksysbimg/$wpar.bak
done

Just for the curious mind – the output of the savewpar command is presented bellow.

InfoPROD:/>savewpar -f /backups/infaprtu001.bak infaprtu001
Creating list of files to back up.
Backing up 62988 files................
62988 of 62988 files (100%)
0512-038 savewpar: Backup Completed Successfully.
InfoPROD:/>

InfoPROD:/>restore -T -f infaprtu001.bak
Please mount volume 1 on infaprtu001.bak.
Press the Enter key to continue.
./var/websm/lwi/runtime/core/rcp/eclipse/plugins/com.ibm.lwi.deployment.nl2_7.1.1.0-LWI/fragment.xml
./var/websm/lwi/runtime/core/rcp/eclipse/plugins/com.ibm.lwi.deployment.nl2_7.1.1.0-LWI/nl2.jar
./var/websm/lwi/runtime/core/rcp/eclipse/plugins/com.ibm.lwi.deployment.nl3_7.1.1.0-LWI
./var/websm/lwi/runtime/core/rcp/

Have you noticed above that the restore command can read the savewpar product?

Posted in Real life AIX, wpar.

Tagged with , , , , , , , , , .


more about wpar (with SAN)

”We have to implement new application that will have two environments: PROD and TEST, and we need it yesterday…..” This post is about a real thing. It shows how little time is required to create a new AIX “host” which is not lpar but wpar, and how wpar is “indistinguishable” from the “real” machine. For clarity, I renamed the test wpar/host to TEST and the “owning” it lpar to PROD.

I created one lpar with enough resources for these two environments (CPU, RAM, etc). By the way, all disks even the “boot” come to PROD and TEST via SAN. Next, I modified lpars /etc/hosts to include an entry describing the TEST environment host name and its IP address. It is time to build wpar!

Let’s make one wpar with its own rootvg! Bellow, you see all hdisks owned by PROD. One disk will be given to wpar (TEST) which will use as its rootvg hdisk.

PROD:/root>lspv
hdisk1          00cd683432d2c709                    rootvg          active
hdisk2          00cd68341891b769                    None
hdisk3          00cd6834181aa3ea                    None

PROD:/root>bootinfo -s hdisk2
409600
PROD:/root>bootinfo -s hdisk3
20480

Hdisk2 is big! It will become TEST’s data volume group. Hdisk3 is smaller and big enough for a rootvg disk.

PROD:/root mkwpar -A -D devname=hdisk3 rootvg=yes -O -h TEST \
-l -n TEST -N interface=en0 address=159.14.245.56 netmask=255.255.255.0 \
-P -r -s -o /root/wpar.config
Creating workload partition's rootvg. Please wait...
mkwpar: Creating file systems...
/
/admin
/home
/opt
/proc
/tmp
/usr
/var
Mounting all workload partition file systems.
mkwpar: Copying base files...
….. ….

During wpar creation, its rootvg disk will be temporarily assigned to volume group called vg00. This disk like all disks assigned to wpar will eventually disappear from the lpar (PROD) inventory. Bellow, you see the vg00 – the wpar’s rootvg is not yet fully ready.

PROD:/root>lspv
hdisk1          00cd683432d2c709                    rootvg          active
hdisk2          00cd68341891b769                    None
hdisk3          00cd6834181aa3ea                    vg00            active

After creation of wpar’s rootvg the installation process starts loading it with AIX.

…......... ….....
os.net.nfs.client          6.1.4.5         ROOT        APPLY       SUCCESS
ifor_ls.base.cli             6.1.0.0         ROOT        APPLY       SUCCESS
lum.base.cli                 5.1.2.0         ROOT        APPLY       SUCCESS
Finished populating scratch file systems.
Workload partition TEST created successfully.
Starting workload partition TEST.
Mounting all workload partition file systems.
Loading workload partition.
Exporting workload partition devices.
hdisk3 Defined
Starting workload partition subsystem cor_TEST.
0513-059 The cor_TEST Subsystem has been started. Subsystem PID is 377058.
Verifying workload partition startup.

To display the state of the new wpar:

PROD:/root>lswpar
Name         State  Type  Hostname     Directory           RootVG WPAR
-----------------------------------------------------------------------
TEST            A      S       TEST          /wpars/TEST           yes
PROD:/root>

The wpar is Active and ready to be used. Now, let see what is going on with its rootvg disks.

PROD:/root>lspv
hdisk1          00cd683432d2c709                    rootvg          active
hdisk2          00cd68341891b769                    None
PROD:/root>

The disk is gone, lpar no longer owns it. Fact to remember – each disk originally owned by lpar after acquiring by wpar disappears from the lpar inventory. Now it is time, to give TEST wpar another disk – the disk which will be used to create a volume group which file systems will be used to load the application binaries, data, and so forth.To assign PROD’s owned hdisk2 to the wpar, we need to execute:

PROD:/root>chwpar -D devname=hdisk2 devtype=disk TEST

Now, we need to login to wpar to put hdisk2 to use – to build a volume group.How to get there? Either execute clogin TEST or just telnet or ssh to open a login session. Once inside, let’s look around.

# lspv
hdisk0          00cd6834181aa3ea                    rootvg          active

Something is missing. Where is hdisk2? I need to execute cfgmgr. After all , this is AIX, right?!.

cfgmgr;lspv
hdisk0          00cd6834181aa3ea                    rootvg          active
hdisk1          00cd68341891b769                    None

Hdisk name did change but its PVID tells us that this is the same disk! Next, executing df -g shows /usr dangerously low on free space.

TEST:/etc>df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
Global                   0.09      0.04   62%     2668    24% /
/dev/hd4               0.09      0.04   62%     2668    24% /
/dev/hd2               4.38      0.19   96%    45642   50% /usr
/dev/hd10opt         0.50      0.28   44%     8823    12% /opt
/dev/hd11admin      0.03      0.03    3%        5        1% /admin
/dev/hd1               0.03      0.03    3%        5       1% /home
/dev/hd3               0.09      0.09    2%       15      1% /tmp
/dev/hd9var           0.12      0.06   52%     4406    24% /var
Global                    0.12      0.12    2%        5         1% /etc/objrepos/wboot
Global                       -         -      -           -     -        /proc

I need to increase /usr capacity.

TEST:/etc>chfs -a size=+1G /usr
Filesystem size changed to 11272192
Inlinelog size changed to 22 MB.

TEST:/etc>df -g | grep usr
/dev/hd2           5.38      1.18   78%    45642    15% /usr

As I look around, I receive an email to let me know that the requirements of the new TEST environment have changed and now it requires more storage then announced earlier. OK, I send a ticket to SAN Administrator to zone two LUNS to this lpar. The bigger LUN will used by PROD and the smaller one will go to TEST. Soon, he responds and cfgmr executed on the lpar (PROD) brings them in. For the second time, I have to assign one of them to wpar (TEST).

PROD:/root>bootinfo -s hdisk10
102400
PROD:/root>bootinfo -s hdisk11
491520
PROD:/root>

The smaller disk goes to wpar. The bigger one stays here, it will be used for PROD storage. Hdisk10 has to be assigned to the wpar.

PROD:/root>chwpar -D devname=hdisk10 devtype=disk TEST

I have a second PUTTY session open on TEST where I execute:

TEST:/etc>cfgmgr
TEST:/etc>lspv
hdisk0          00cd6834181aa3ea                    rootvg          active
hdisk1          00cd68341891b769                    None
hdisk2          none                                None
TEST:/etc>

Let’s build a volume group in TEST.

TEST:/etc>mkvg -f -y infoTST_vg -s 512 hdisk1 hdisk2
infoTST_vg

The rest is trivial, build logical volumes, then their file systems, change their permissions and ownership, mount them. Do not forget to create users and their group and then check and modify the entries in /etc/security. Do not assume that since wpar is a copy of lpar the copy is 100%. LPAR is not a NIM server for its WPARS. Each wpar /etc/security is the same “shape” as if you installed a new OS from CD or DVD.

Posted in Real life AIX.

Tagged with , , , , , , .