How to create two VIO Servers and two Client with failover Author : Siddhartha S Sinha Rev : 1.0 Check my website www.sinhass.com for more technical stuffs.
Test Scenario: Two VIO servers will have these physical resources 4 GB of memory, 2 CPU (uncapped with weight of 128) 20 virtual processors 1 quad port Gigabit Ethernet adapter (Network cable only on port 0) Few SAS adapter with local disks Two VIO Clients will have these physical resources 4 GB of memory 4 CPU Virtual disk will be provided by logical volume created in each VIO Server. I will create one separate Volume Group for this purpose in each VIO Server. VG Name will be clientsrootvg and lvnames will be test1rootlv & test2rootlv In both VIO Server We will load the both VIO servers and two test VIOC LPARs from a NIM Server.
Once completed testvio1 will look like this testvio2 will look like this test1lpar will look like this
and test2lpar will look like this Now we have the plan so we will build the testvio1 server now. STEPS TO BUILD TESTVIO1 SERVER In the HMC I will click on the + sign beside Systems Management then again I will click on Servers and then ServerName. Next screen will be like this. Now I will expand Configuration > Create Logical Partition > VIO Server
I will type my first vio Partition name as testvio1, leave the partition id 2 alone and I will click Next. Next I selected Shared processor. This Server has 48 CPU but I wanted to try Shared CPU stuffs so I decided to use it. And I will click Next now.
Here I selected 2 minimum, 4 desired and 6 maximum. Then I selected minimum 20 virtual Processor (1 CPU=10 Virtual CPU), 40 Desired and 60 Maximum. And I checked the uncapped Weight 128.0, little Bit too much. Now I will click next Next screen I will straight select absolute 4GB memory requirement. So my minimum, Desired and Maximum Memory requirement is 4GB. Nothing more or less. I will click on the Next button once I am done.
Ok, I will select the Physical I/Os whatever I planned before for this Server. And then I will click on that little Add as required button before I click on next. If I forget to click on Add as required I will have no I/O at all and I will have to come back and do this again. As I did so I will click on Next Button.
Now I always like to add more numbers so I will bump Maximum Virtual Adapters to 50. 20 would be sufficient but I am planning to create some more VIOC Lpars to do some more test after this failover test.
I just clicked Next button here as I am not going to use any of these Logical Host Ethernet Adapters for my test. Same thing here. I will just click on Next.
I will not change anything here as I want Normal Mode as default. Looks good to me. So I will click the Finish Button.
Now I am going to activate it.
But I want it to boot to SMS Mode for this session so that I can go and configure the Network to load from my NIM Server and I want the console to be opened same time It is activated. So I checked Open a Terminal window or console session and then I will click on Advanced Button. Now it opened another windows and I will select SMS and will click OK.
Now it will open the console and I will setup the interface to boot from my NIM Server. In the mean time I will go to my NIM server and stage NIM Images for this Server. This is the screenshot from my NIM Server. So Installation type is mksysb and makesysb name I gave for this Image as VIOS2_2_mksysb. Also I need a spot so I created one and named it as vios_v2_2_spot and I created lpp_source to for this VIO Image as well as all the VIO images we have. I created the lpp_source to cover any missing driver. I will cover all those steps some other time. Also I have a Customization Script which basically copies extra drivers, softwares, my scripts etc to the client. Then two other files, BOSINST_DATA which I named as No_Prompt picks up some stuffs automatically so that I don t have to wait for selecting disks etc And then Customization FB script Install_Drivers actually install all sdd/sddpcm devices based on the AIX version and does lot of other stuffs automatically so that I don t have to be worry about anything missing. Anyway I already came back and started testvio1 server to boot from network and here is the screen shot
Now I can see how and why I needed that lpp_source. This VIO 2.2 version does missing some software or drivers required for this MMB ( latest Power7 ) Server and it is loading them now. Now I will go and build testvio2 same way I did testvio1 and load it from NIM Server. Now both of my VIO Servers built. I am going to login as padmin and it will ask me to Change the password. So I will change it.
First thing after logging in to both VIO servers I will do is run this command $ license accept Next thing I will do is to create both of my testlpars, test1lpar and test2lpar. I will go to Configuration > Create Logical Partition and will click on AIX or Linux.
I will name is as test1lpar and click Next button Profile name I will select as Normal and will click next.
I am going to use dedicated Processor for this lpar so I will click on Dedicated and then I will click on Next.
I will type 4 for all Minimum, Desired and Maximum processors and then I will click on Next. I will do same thing for Memory and click on next As all the I/Os will be provided by the VIO Servers I will select nothing here and will just Click on Next.
I will bump up the nos. of Maximum virtual adapters from 10 to 20 and click on Next I will select nothing here and click on Next.
I will select nothing here too and click on Next I won t change anything here and will just click on Next.
I will verify CPU and Memory from the screen and will click on Finish Here is my new lpar. I will leave it alone and will build the next one same way.
Now all of my lpars built. Now I will select test1vio and change the profile to add the virtual adapters. I will select The lpar and click on Manage Profiles under Configuration menu.
Now I will click on Normal. Sometimes for the older servers I had to click on the check Box under Select and then had to go to Actions Button and then Edit button to get into Next screen. I will click on Virtual Adapters Button here.
Now I am in Virtual Adapter screen. I will click on Actions button here then Create Virtual Adapter and then Ethernet Adapter
Here I will change Virtual Adapter ID to 10, I will leave VLAN ID to 1 I will check the box For This adapter is required for partition activation And I will select checkbox for Access external network and I will leave Trunk priority to 1. I am not selecting IEEE 802.1q compatible adapter for this test. I would select that if I had few CISCO tagged VLANS. After making all the necessary changes I will click OK. I will do again do the same again for next adapter Actions Create Virtual Adapter Ethernet Adapter And this time I will select Adapter ID as 11 and VLAN 99 and nothing else. This will be used as Control Channel Virtual Ethernet.
Now I will add the Virtual SCSI Adapters. So Actions Create Virtual Adapter SCSI Adapter Then I will use 20 for Virtual SCSI Adapter. I will click on the check box for This Adapter is Required for partition activation and then I will select Only selected client partition can connect and from the drop down menu I will select test1lpar(4) and then I will type Client Adapter ID 15 and then I will click OK button.
Now I will add another Virtual SCSI adapter using the same method. This time I will use Virtual SCSI Adapter ID 21 I will click on the check box on This adapter is required for partition activation and Then I will click on Only selected client partition can connect and from the drop down menu I will select test2lpar(5) and then I will type Client Adapter ID 15 and then I will click OK button. Final screen looks like this. Now I will click OK, and then I will shutdown testvio1 lpar. $shutdown force Once this lpar is down I will re activate it from HMC. Now I will select testvio2 and will do the same thing. For 1st Virtual Ethernet adapter id I will use 12, VLAN ID 1, I will check on This adapter is required for partition activation. I will also select This adapter is Required for partition activation check box. And most important for this box is Trunk Priority will be 2
Next adapter ID will be 13, VLAN ID 99 and I will select This adapter is required for partition activation Now I will add the Virtual SCSI Adapters. Final screen will be like this.
Now I will shutdown this lpar testvio2 $ shutdown force And then I will activate it from HMC. Now I will log in to testvio1 using padmin id and password I set before and will run this command $ lsdev virtual So I got ent4 and ent5 as virtual Ethernet and vhost0 and vhost1 as virtual scsi adapter Now I will create shared Ethernet adapter using ent4 and ent5. But before that I have to remove existing IP address as I installed this server from NIM Server. To do that I will run rmtcpip all and select y and enter.
$ rmtcpip all Parameters to be reset: Hostname yes Nameserver yes Effective immediately yes Routing yes Are you sure? (y/n) Y Now I will create the Shared Ethernet Adapter ( SEA) $ mkvdev sea ent0 vadapter ent4 default ent4 defaultid 1 attr \ ha_mode=auto ctl_chan=ent5 ent6 Available Now I will configure the IP address $ mktcpip hostname testvio1 inetaddr 172.24.145.81 interface en5 start netmask 255.255.255.0 \ gateway 172.24.145.1 Now I will check whether I did it right or not using any of these two commands or using both. $ lstcpip interfaces $ netstat state num I will ping the gateway and check whether my network is working or not before I proceed further. Next thing I am going to do is create a separate Volume Group for test1lpar and test2lpar virtual disks. And I will mirror the rootvg. I can use telnet or ssh session too as I just configure the network. From another telnet/ssh session I will run $ extendvg f rootvg hdisk1 $ mirrorios defer hdisk1 ( you can use oem_setup_env and use mirrorvg as this command is going to call mirrorvg command anyway) Now back to console and I will create a Volume Group to use for test1lpar and test2lpar $ mkvg f vg clientsrootvg hdisk2 hdisk3 Verify what previous command did $ lsvg pv clientsrootvg Now I will create lvs to use as rootdisk for test1lpar1 and test2lpar. $ mklv lv test1lparrootlv clientsrootvg 70g hdisk2 ( Mirroring the lvs here was a bad idea I found later, client lpars were very slow because I used mirror option here) $ lsvg lv clientsrootvg $ mklv lv test2lparrootlv clientsrootvg 70g hdisk3
$ lsvg lv clientsrootvg Now I will start start assigning these lvs to the associated vhosts. $ lsdev slots # Slot Description Device(s) U9117.MMB.102DB3F V2 C0 Virtual I/O Slot vsa0 U9117.MMB.102DB3F V2 C10 Virtual I/O Slot ent4 U9117.MMB.102DB3F V2 C20 Virtual I/O Slot vhost0 U9117.MMB.102DB3F V2 C21 Virtual I/O Slot vhost1 Vhost0 is on slot 20 and we will use that for test1lpar and vhost1 is on slot21 and we associated that to test2lpar. Now we will run the following commands $ mkvdev vdev test1lparrootlv vadapter vhost0 dev test1lparroot test1lparroot Available $ mkvdev vdev test2lparrootlv vadapter vhost1 dev test2lparroot test2lparroot Available I will verify what I did on vhost0
Now on vhost1 Now I will go back to testvio2 and do the same things there before I start the client lpars. Now I will add the Virtual Adapters to test1lpar1 and test2lpar
I will add the Virtual Ethernet and both virtual scsi adapters using the same method I did for VIO Servers. Virtual Ethernet Adapter I did as below For the 1st Virtual SCSI Adapters I did as below which will be connected to testvio1
For the 2nd Virtual SCSI Adapters I did as below which will be connected to testvio2 Final setting will look like this.
Same thing for test2lpar. Settings below for Ethernet And for 1st Virtual SCSI Adapter connected to testvio1
Here is what I did for the 2nd Virtual SCSI Adapter connected to testvio2 Now both of my VIOC Lpars built. I will load them from NIM Server. Now to make things easier for me I used hdisk0 for both test1lpar and test2lpar from testvio1 Server. Later I will mirror them with hdisk1 which comes from testvio2 server. NIM load completed now and I will log in to the console for test1lpar as root and no password. I will check the configuration now # lsdev Cc disk # lscfg vpl hdisk0 # lscfg vpl hdisk1
From testvio1 server From testvio2
Back to test1vio lpar and I will verify disk sizes Now I will login to test2lpar and will do the same
Now back to testvio1 and Now on tesvio2
Everything is looking good. Back to test2lpar and will check the disk sizes Next thing I will do I will go back to test1lpar and mirror the rootvg
So first I will extend the rootvg to hdisk1 # extendvg f rootvg hdisk1 # mirrorvg S m rootvg hdisk1 ( This command will run in the background and will take a while) Now I will go back to test2lpar and do the same thing. Once mirroring completed in both test1lpar and test2lpar I will change the bootlist # bootlist m normal hdisk0 hdisk1 Now I will run bootlist m normal if both entries doesn t look exactly the same then I willrun bosboot ad /dev/hdisk1 and rerun bootlist m normal Hopefully this time it will be OK. Now I will check the rootvg status on both test1lpar Now on test2lpar
I will shutdown viotest1 server now.
Will verify from HMC Screen
Now we will see if the servers still can ping outside or not.
So network failover working, server is also up. Now I will check with lsvg I will check test2lpar now
Now lsvg on testvio2 Now, I will reboot both test1lpar and test2lpar to check whether it can survive a reboot when test1vio failed. Now I will check how test1lpar looks like.
So hdisk0 is defined and not available any more. And it survived a reboot and network also working. Now test2lpar This lpar also survived a reboot though hdisk0 not available and network also working. So we know now that both of my VIOC lpars will work even when testvio1 failed. Now I will run the same test to check whether these two lpars can survive a reboot when testvio2 fails. But before that I need to bring testvio1 online, resync the mirror and then I will test. So I am activating testvio1 now. Once testvio1 is up I will run cfgmgr on both test1lpar and test2lpar and rerun those commands
Looks good, now on test2lpar
This one also looks good. Now I will check the mirror status. Needs re sync Same thing on test2lpar
I will resync them. hdisk0 may come as removed state. I will use chpv command to fix that and then I will run syncvg rootvg. Test1lpar is synced test2lpar is synced Now I will shutdown testvio2
test1lpar rootvg stale status
test2lpar lv stale status
Network still up Few more status after I rebooted test1lpar Conclusion: So finally I could test the VIO failover successfully.