Вы находитесь на странице: 1из 53

HowtocreatetwoVIO

ServersandtwoClient
withfailover

Author:SiddharthaSSinha
Rev:1.0

Checkmywebsitewww.sinhass.comformoretechnicalstuffs.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha

TestScenario:

TwoVIOserverswillhavethesephysicalresources
4GBofmemory,
2CPU(uncappedwithweightof128)
20virtualprocessors
1quadportGigabitEthernetadapter(Networkcableonlyonport0)
FewSASadapterwithlocaldisks

TwoVIOClientswillhavethesephysicalresources
4GBofmemory
4CPU
VirtualdiskwillbeprovidedbylogicalvolumecreatedineachVIOServer.I
willcreateoneseparateVolumeGroupforthispurposeineachVIOServer.
VGNamewillbeclientsrootvgandlvnameswillbetest1rootlv&test2rootlv
InbothVIOServer

WewillloadthebothVIOserversandtwotestVIOCLPARsfromaNIMServer.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Oncecompletedtestvio1willlooklikethis

testvio2willlooklikethis

test1lparwilllooklikethis
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

andtest2lparwilllooklikethis

Nowwehavetheplansowewillbuildthetestvio1servernow.

STEPSTOBUILDTESTVIO1SERVER
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
willexpandConfiguration>CreateLogicalPartition>VIOServer

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
IwilltypemyfirstvioPartitionnameastestvio1,leavethepartitionid2alone
andIwillclickNext.

NextIselectedSharedprocessor.ThisServerhas48CPUbutIwantedtotry
SharedCPUstuffssoIdecidedtouseit.AndIwillclickNextnow.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
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.AndIcheckedtheuncappedWeight128.0,littleBittoomuch.Now
Iwillclicknext

Next screen I will straight select absolute 4GB memory requirement. So my


minimum, Desired and Maximum Memory requirement is 4GB. Nothing more
orless.IwillclickontheNextbuttononceIamdone.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Ok,IwillselectthePhysicalI/OswhateverIplannedbeforeforthisServer.And
thenIwillclickonthatlittleAddasrequiredbuttonbeforeIclickonnext.IfI
forget to click on Add as required I will have no I/O at all and I will have to
comebackanddothisagain.AsIdidsoIwillclickonNextButton.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Now I always like to add more numbers so I will bump Maximum Virtual
Adapters to50.20wouldbesufficient butIam planning tocreatesome more
VIOCLparstodosomemoretestafterthisfailovertest.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

I just clicked Next button here as I am not going to use any of these Logical
HostEthernetAdaptersformytest.

Samethinghere.IwilljustclickonNext.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

IwillnotchangeanythinghereasIwantNormalModeasdefault.

Looksgoodtome.SoIwillclicktheFinishButton.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

NowIamgoingtoactivateit.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
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
beopenedsametimeItisactivated.SoIcheckedOpenaTerminalwindowor
consolesessionandthenIwillclickonAdvancedButton.

NowitopenedanotherwindowsandIwillselectSMSandwillclickOK.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Now it will open the console and I will setup the interface to boot from my
NIMServer.InthemeantimeIwillgotomyNIMserverandstageNIMImages
forthisServer.ThisisthescreenshotfrommyNIMServer.SoInstallationtype
ismksysband makesysb nameIgavefor thisImageasVIOS2_2_mksysb.AlsoI
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 dont have to wait for selecting disks etc And then
CustomizationFBscriptInstall_Driversactuallyinstallallsdd/sddpcmdevices
based on the AIX version and does lot of other stuffs automatically so that I
donthavetobeworryaboutanythingmissing.

Anyway I already came back and started testvio1 server to boot from network
andhereisthescreenshot
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Now I can see how and why I needed that lpp_source. This VIO 2.2 version
doesmissingsomesoftwareordrivers requiredfor thisMMB(latestPower7)
Serveranditisloadingthemnow.

Now I will go and build testvio2 same way I did testvio1 and load it from NIM
Server. Now bothof myVIOServers built.Iamgoing tologinas padminandit
willaskmetoChangethepassword.SoIwillchangeit.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

FirstthingafterloggingintobothVIOserversIwilldoisrunthiscommand
$licenseaccept
NextthingIwilldoistocreatebothofmytestlpars,test1lparandtest2lpar.
I will go to Configuration> Create Logical Partition and will click on AIX or
Linux.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Iwillnameisastest1lparandclickNextbutton

ProfilenameIwillselectasNormalandwillclicknext.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

I am going to use dedicated Processor for this lpar so I will click on Dedicated
andthenIwillclickonNext.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Iwill type 4forallMinimum,DesiredandMaximum processorsand thenI will
clickonNext.

IwilldosamethingforMemoryandclickonnext

AsalltheI/OswillbeprovidedbytheVIOServersIwillselectnothinghereand
willjustClickonNext.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Iwillbumpupthenos.ofMaximumvirtualadaptersfrom10to20andclickon
Next

IwillselectnothinghereandclickonNext.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

IwillselectnothingheretooandclickonNext

IwontchangeanythinghereandwilljustclickonNext.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

IwillverifyCPUandMemoryfromthescreenandwillclickonFinish

Hereismynewlpar.Iwillleaveitaloneandwillbuildthenextonesameway.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Nowallofmylparsbuilt.

Now I will select test1vio and change the profile to add the virtualadapters. I
will select The lpar and click on Manage Profiles under Configuration
menu.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

NowIwillclickonNormal.

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.IwillclickonVirtualAdaptersButtonhere.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

NowIaminVirtualAdapterscreen.IwillclickonActionsbuttonherethen
CreateVirtualAdapterandthenEthernetAdapter

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
HereIwillchangeVirtualAdapterIDto10,IwillleaveVLANIDto1Iwillcheck
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
amnotselectingIEEE802.1qcompatibleadapterforthistest.Iwouldselect
that ifIhadfewCISCO taggedVLANS.After makingallthe necessarychangesI
willclickOK.

Iwilldoagaindothesameagainfornextadapter
ActionsCreateVirtualAdapterEthernetAdapter
And thistimeIwillselectAdapterIDas11andVLAN 99andnothingelse.This
willbeusedasControlChannelVirtualEthernet.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Now I will add the Virtual SCSI Adapters. So ActionsCreate Virtual


AdapterSCSIAdapter
ThenIwilluse20forVirtualSCSIAdapter.IwillclickonthecheckboxforThis
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
selecttest1lpar(4)andthenIwilltypeClientAdapterID15andthenIwillclick
OKbutton.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
NowIwilladdanotherVirtualSCSIadapter using thesamemethod.Thistime
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
selecttest2lpar(5)andthenIwilltypeClientAdapterID15andthenIwillclick
OKbutton.Finalscreenlookslikethis.

NowIwillclickOK,andthenIwillshutdowntestvio1lpar.
$shutdownforce
OncethislparisdownIwillreactivateitfromHMC.
Now I will select testvio2 and will do the same thing. For 1st Virtual Ethernet
adapter idI willuse 12,VLANID1,I will checkonThisadapterisrequiredfor
partition activation. I will also select This adapter is Required for partition
activationcheckbox.AndmostimportantforthisboxisTrunkPrioritywill
be2
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Next adapter ID will be 13, VLAN ID 99 and I will select This adapter is
requiredforpartitionactivation

NowIwilladdtheVirtualSCSIAdapters.Finalscreenwillbelikethis.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

NowIwillshutdownthislpartestvio2
$shutdownforce
AndthenIwillactivateitfromHMC.NowIwilllogintotestvio1usingpadmin
idandpasswordIsetbeforeandwillrunthiscommand
$lsdevvirtual

SoIgotent4andent5asvirtualEthernetandvhost0andvhost1asvirtualscsi
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
NIMServer.TodothatIwillrun
rmtcpipallandselectyandenter.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
$rmtcpipall
Parameterstobereset:
Hostnameyes
Nameserveryes
Effectiveimmediatelyyes
Routingyes
Areyousure?(y/N)Y
NowIwillcreatetheSharedEthernetAdapter(SEA)
$ mkvdev sea ent0 vadapter ent4 default ent4 defaultid 1 attr \
ha_mode=autoctl_chan=ent5
ent6Available
NowIwillconfiguretheIPaddress
$ mktcpip hostname testvio1 inetaddr 172.24.145.81 interface en5 start
netmask255.255.255.0\
gateway172.24.145.1
NowIwillcheckwhetherIdiditrightornotusinganyofthesetwocommands
orusingboth.
$lstcpipinterfaces
$netstatstatenum
Iwillpingthegatewayandcheckwhethermynetworkisworkingornotbefore
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
canusetelnetorsshsessiontooasIjustconfigurethenetwork.
Fromanothertelnet/sshsessionIwillrun
$extendvgfrootvghdisk1
$mirroriosdeferhdisk1
( 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
VolumeGrouptousefortest1lparandtest2lpar
$mkvgfvgclientsrootvghdisk2hdisk3
Verifywhatpreviouscommanddid
$lsvgpvclientsrootvg
NowIwillcreatelvstouseasrootdiskfortest1lpar1andtest2lpar.
$mklvlvtest1lparrootlvclientsrootvg70ghdisk2
( Mirroring the lvs here was a bad idea I found later, client lpars were very
slowbecauseIusedmirroroptionhere)
$lsvglvclientsrootvg
$mklvlvtest2lparrootlvclientsrootvg70ghdisk3
Publishing without permission is prohibited
This document is created by Siddhartha Sinha
$lsvglvclientsrootvg
NowIwillstartstartassigningtheselvstotheassociatedvhosts.
$lsdevslots
#SlotDescriptionDevice(s)
U9117.MMB.102DB3FV2C0VirtualI/OSlotvsa0
U9117.MMB.102DB3FV2C10VirtualI/OSlotent4
U9117.MMB.102DB3FV2C20VirtualI/OSlotvhost0
U9117.MMB.102DB3FV2C21VirtualI/OSlotvhost1
Vhost0isonslot20andwewillusethatfortest1lparandvhost1isonslot21
andweassociatedthattotest2lpar.Nowwewillrunthefollowingcommands
$mkvdevvdevtest1lparrootlvvadaptervhost0devtest1lparroot
test1lparrootAvailable
$mkvdevvdevtest2lparrootlvvadaptervhost1devtest2lparroot
test2lparrootAvailable
IwillverifywhatIdidonvhost0

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Nowonvhost1

Now I will go back to testvio2 and do the same things there before I start the
clientlpars.NowIwilladdtheVirtualAdapterstotest1lpar1andtest2lpar

Publishing without permission is prohibited


This document is created by Siddhartha Sinha

I will add the Virtual Ethernet and both virtual scsi adapters using the same
methodIdidforVIOServers.VirtualEthernetAdapterIdidasbelow

For the 1st Virtual SCSI Adapters I did as below which will be connected to
testvio1
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

For the 2nd Virtual SCSI Adapters I did as below which will be connected to
testvio2

Finalsettingwilllooklikethis.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Samethingfortest2lpar.SettingsbelowforEthernet

Andfor1stVirtualSCSIAdapterconnectedtotestvio1
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

HereiswhatIdidforthe2ndVirtualSCSIAdapterconnectedtotestvio2

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
testvio1Server.LaterIwillmirrorthemwithhdisk1whichcomesfromtestvio2
server.NIMloadcompletednowandIwilllogintotheconsolefortest1lparas
rootandnopassword.Iwillchecktheconfigurationnow
#lsdevCcdisk
#lscfgvplhdisk0
#lscfgvplhdisk1
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Fromtestvio1server

Fromtestvio2
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Backtotest1violparandIwillverifydisksizes

NowIwilllogintotest2lparandwilldothesame
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Nowbacktotestvio1and

Nowontesvio2
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Everythingislookinggood.Backtotest2lparandwillcheckthedisksizes

NextthingIwilldoIwillgobacktotest1lparandmirrortherootvg
Publishing without permission is prohibited
This document is created by Siddhartha Sinha
SofirstIwillextendtherootvgtohdisk1
#extendvgfrootvghdisk1
# 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
#bootlistmnormalhdisk0hdisk1
Now I will run bootlist m normal if both entries doesnt look exactly the
samethenIwillRunbosbootad/dev/hdisk1andrerunbootlistmnormal
Hopefully this time it will be OK. Now I will check the rootvg status on both
test1lpar

Nowontest2lpar
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Iwillshutdownviotest1servernow.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

WillverifyfromHMCScreen
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Nowwewillseeiftheserversstillcanpingoutsideornot.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Sonetworkfailoverworking,serverisalsoup.NowIwillcheckwithlsvg

Iwillchecktest2lparnow

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Nowlsvgontestvio2

Now,Iwill rebootboth test1lparand test2lpar tocheck whetheritcansurvive


arebootwhentest1viofailed.NowIwillcheckhowtest1lparlookslike.

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
So hdisk0 is defined and not available any more. And it survived a reboot and
networkalsoworking.Nowtest2lpar

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.NowI 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
test2lparandrerunthosecommands
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Looksgood,nowontest2lpar

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Thisonealsolooksgood.NowIwillcheckthemirrorstatus.Needsresync

Samethingontest2lpar

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
I will resync them. hdisk0 may come as removed state. I will use chpv
commandtofixthatandthenIwillrunsyncvgrootvg.Test1lparissynced

test2lparissynced

NowIwillshutdowntestvio2
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

test1lparrootvgstalestatus
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

test2lparlvstalestatus

Publishing without permission is prohibited


This document is created by Siddhartha Sinha
Networkstillup

FewmorestatusafterIrebootedtest1lpar

Conclusion:SofinallyIcouldtesttheVIOfailoversuccessfully.
Publishing without permission is prohibited
This document is created by Siddhartha Sinha

Вам также может понравиться