SEA Failover definition in dual vios setup

Scenario , ambiente dual vios su cui vogliamo costruire una shared ethernet adapter con failover e vlan multiple.

Su entrambi I vios definire due virtual adapters su cui verranno configurate le vlan necessarie , in questo caso la 1 per la rete di produzione e la 606 per la management . E’ necessario attivare il 802.1q per poter assegnare vlan multiple all’adapter. Sul primo vios della coppia assegnamo anche trunk priority uguale a 1 .

 

 

 

 

Sul secondo vio replichiamo la stessa configurazione con però trunk priority uguale a 2.

 

 

 

 

A questo punto configuriamo I due virtual adapter che costituiranno il control channel per il failover della SEA . In questo caso utilizziamo un vlanid non usato , ad es . 999 , senza settare 802.1q e il

bridging.

 

 

 

 

 

Definiamo infine la SEA :

 

mkvdev -sea ent2 -vadapter ent3 -default ent3 -defaultid 1 -attr ha_mode=auto ctl_chan=ent4

ent5 Available

en5

et5

 

dove ent2 è la fisica , nel nostro caso un etherchannel costruito su due fisiche;

ent3 è il vadapter che conosce le vlan di prod e mgmt ;

defaultid = il vlanid di default ; ctl_chan = il vadapter sulla vlan 999 ;

 

Configuriamo l’ip address sulla sea oppure aggiungiamo un ulteriore vadapter per rimanere indipendenti dalla SEA e non perdere connettività in caso di manutenzione.

 

mkvdev -vlan ent5 -tagid 606

ent6 Available

en6

et6

 

e assegnamo l’ip address al nuovo adapter

 

mktcpip -hostname viosXX1 -inetaddr XX.XX.XX.XX -interface en5 -netmask 255.255.255.0 -gateway XX.XX.XX.XX mktcpip -hostname viosXX2 -inetaddr XX.XX.XX.XX -interface en5 -netmask 255.255.255.0 -gateway XX.XX.XX.XX

 

 

 

Scripted LPAR building

The following commands sequence creates the needed objects to start the lpar installation process.

On the NIM Server, let’s add the correct entries in /etc/hosts:

hostent -a 192.168.45.49 -h lparu01vir-int
hostent -a 192.168.45.50 -h lparu02vir-int
hostent -a 192.168.45.51 -h lparu03vir-int
hostent -a 192.168.45.52 -h lparu04vir-int
hostent -a 192.168.45.53 -h lparu05vir-int
hostent -a 192.168.45.54 -h lparu06vir-int
hostent -a 192.168.45.55 -h lparu07vir-int
hostent -a 192.168.45.56 -h lparu08vir-int

and let’s define the nim objects, the type is standalone:

nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu01vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu01vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu02vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu02vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu03vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu03vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu04vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu04vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu05vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu05vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu06vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu06vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu07vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu07vir-int
nim -o define -t standalone -a platform=”chrp” -a netboot_kernel=”up” -a if1=”find_net lparu08vir-int 0″ -a cable_type1=”bnc” -a net_definition=”ent 255.255.255.0 gw1 gw_master” lparu08vir-int

In the hmc command line, we should define lpars’ profiles.

mksyscfg -r lpar -m “p8-850-one” -i “profile_name=lparu01vir,name=lparu01vir,lpar_id=10,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios71/30/1,7/client/2/vios72/30/0,8/client/1/vios71/31/0,9/client/2/vios72/31/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-one” -i “profile_name=lparu03vir,name=lparu03vir,lpar_id=11,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios71/32/1,7/client/2/vios72/32/0,8/client/1/vios71/33/0,9/client/2/vios72/33/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-one” -i “profile_name=lparu05vir,name=lparu05vir,lpar_id=12,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios71/34/1,7/client/2/vios72/34/0,8/client/1/vios71/35/0,9/client/2/vios72/35/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-one” -i “profile_name=lparu07vir,name=lparu07vir,lpar_id=13,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios71/36/1,7/client/2/vios72/36/0,8/client/1/vios71/37/0,9/client/2/vios72/37/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”

mksyscfg -r lpar -m “p8-850-two” -i “profile_name=lparu02vir,name=lparu02vir,lpar_id=10,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios81/30/1,7/client/2/vios82/30/0,8/client/1/vios81/31/0,9/client/2/vios82/31/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-two” -i “profile_name=lparu04vir,name=lparu04vir,lpar_id=11,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios81/32/1,7/client/2/vios82/32/0,8/client/1/vios81/33/0,9/client/2/vios82/33/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-two” -i “profile_name=lparu06vir,name=lparu06vir,lpar_id=12,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios81/34/1,7/client/2/vios82/34/0,8/client/1/vios81/35/0,9/client/2/vios82/35/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”
mksyscfg -r lpar -m “p8-850-two” -i “profile_name=lparu08vir,name=lparu08vir,lpar_id=13,lpar_env=aixlinux,all_resources=0,min_mem=8192,desired_mem=40960,max_mem=81920,min_num_huge_pages=0,desired_num_huge_pages=0,max_num_huge_pages=0,mem_mode=ded,mem_expansion=0.0,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.2,desired_proc_units=1.6,max_proc_units=4.0,min_procs=2,desired_procs=8,max_procs=12,sharing_mode=cap,uncap_weight=0,shared_proc_pool_name=DefaultPool,affinity_group_id=none,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=200,\”virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1\”,\”virtual_scsi_adapters=6/client/1/vios81/36/1,7/client/2/vios82/36/0,8/client/1/vios81/37/0,9/client/2/vios82/37/0\”,\”virtual_eth_adapters=2/0/606//0/0/ETHERNET0//all/none,3/0/2//0/0/ETHERNET0//all/none,4/0/634//0/0/ETHERNET0//all/none\”,virtual_eth_vsi_profiles=none,virtual_fc_adapters=none,vnic_adapters=none,vtpm_adapters=none,boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,redundant_err_path_reporting=0,lpar_proc_compat_mode=default,sriov_eth_logical_ports=none,sriov_roce_logical_ports=none”

and dynamically assign the new server adapters that will match with lpars’ client adapters.

This is a DLPAR operation so make sure if the profile synchronization is enabled (Save configuration changes to profile:), otherwise you must manually save the current config to profile, in order not to lose the dynamically added resources in case of poweroff/poweron.

chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 30 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=6”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 30 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=7”
chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 31 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=8”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 31 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=9”

chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 32 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=6”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 32 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=7”
chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 33 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=8”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 33 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=9”

chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 34 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=6”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 34 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=7”
chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 35 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=8”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 35 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=9”

chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 36 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=6”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 36 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=7”
chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 37 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=8”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 37 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=9”

chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 38 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=6”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 38 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=7”
chhwres -m “p8-850-one” -o a –id 1 -r virtualio –rsubtype scsi -s 39 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=8”
chhwres -m “p8-850-one” -o a –id 2 -r virtualio –rsubtype scsi -s 39 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=9”

chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 30 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=6”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 30 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=7”
chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 31 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=8”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 31 -a “adapter_type=server,remote_lpar_id=10,remote_slot_num=9”

chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 32 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=6”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 32 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=7”
chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 33 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=8”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 33 -a “adapter_type=server,remote_lpar_id=11,remote_slot_num=9”

chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 34 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=6”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 34 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=7”
chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 35 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=8”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 35 -a “adapter_type=server,remote_lpar_id=12,remote_slot_num=9”

chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 36 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=6”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 36 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=7”
chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 37 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=8”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 37 -a “adapter_type=server,remote_lpar_id=13,remote_slot_num=9”

chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 38 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=6”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 38 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=7”
chhwres -m “p8-850-two” -o a –id 1 -r virtualio –rsubtype scsi -s 39 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=8”
chhwres -m “p8-850-two” -o a –id 2 -r virtualio –rsubtype scsi -s 39 -a “adapter_type=server,remote_lpar_id=14,remote_slot_num=9”

Now, we must verify that the vios servers are able to see and manage the disks; let’s create the vdevs to allow the disk mapping.

on p8-850-one VIOs
mkvdev -vdev hdisk6 -vadapter vhost12 -dev EMC_lparu01_r0
mkvdev -vdev hdisk7 -vadapter vhost13 -dev EMC_lparu01_d0
mkvdev -vdev hdisk8 -vadapter vhost14 -dev EMC_lparu03_r0
mkvdev -vdev hdisk9 -vadapter vhost15 -dev EMC_lparu03_d0
mkvdev -vdev hdisk10 -vadapter vhost16 -dev EMC_lparu05_r0
mkvdev -vdev hdisk11 -vadapter vhost17 -dev EMC_lparu05_d0
mkvdev -vdev hdisk12 -vadapter vhost18 -dev EMC_lparu07_r0
mkvdev -vdev hdisk13 -vadapter vhost19 -dev EMC_lparu07_d0
mkvdev -vdev hdisk14 -vadapter vhost20 -dev EMC_wnd8u01_r0
mkvdev -vdev hdisk15 -vadapter vhost21 -dev EMC_wnd8u01_d0

on p8-850-two VIOs
mkvdev -vdev hdisk6 -vadapter vhost12 -dev EMC_lparu02_r0
mkvdev -vdev hdisk7 -vadapter vhost13 -dev EMC_lparu02_d0
mkvdev -vdev hdisk8 -vadapter vhost14 -dev EMC_lparu04_r0
mkvdev -vdev hdisk9 -vadapter vhost15 -dev EMC_lparu04_d0
mkvdev -vdev hdisk10 -vadapter vhost16 -dev EMC_lparu06_r0
mkvdev -vdev hdisk11 -vadapter vhost17 -dev EMC_lparu06_d0
mkvdev -vdev hdisk12 -vadapter vhost18 -dev EMC_lparu08_r0
mkvdev -vdev hdisk13 -vadapter vhost19 -dev EMC_lparu08_d0
mkvdev -vdev hdisk14 -vadapter vhost20 -dev EMC_wnd8u02_r0
mkvdev -vdev hdisk15 -vadapter vhost21 -dev EMC_wnd8u02_d0

Again, on the NIM server to execute the bos_inst operation and allocate all the needed resources :
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv01vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu01vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv02vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu02vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv03vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu03vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv04vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu04vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv05vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu05vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv06vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu06vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv07vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu07vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-lparv08vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes lparu08vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-wnd8v01vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes wnd8u01vir-int
nim -o bos_inst -a source=mksysb -a spot=spot-aix720303 -a mksysb=mksysb-wnd8v02vir-int -a accept_licenses=yes -a installp_flags=-acNgXY -a no_client_boot=yes -a preserve_res=yes wnd8u02vir-int

Power on the lpars via the HMC command line interface:

chsysstate -r lpar -o on -b sms -f “lparu01vir” -m “p8-850-one” -n “lparu01vir”

chsysstate -r lpar -o on -b sms -f “lparu02vir” -m “p8-850-two” -n “lparu02vir”

chsysstate -r lpar -o on -b sms -f “lparu03vir” -m “p8-850-one” -n “lparu03vir”

chsysstate -r lpar -o on -b sms -f “lparu04vir” -m “p8-850-two” -n “lparu04vir”

chsysstate -r lpar -o on -b sms -f “lparu05vir” -m “p8-850-one” -n “lparu05vir”

chsysstate -r lpar -o on -b sms -f “lparu06vir” -m “p8-850-two” -n “lparu06vir”

chsysstate -r lpar -o on -b sms -f “lparu07vir” -m “p8-850-one” -n “lparu07vir”

chsysstate -r lpar -o on -b sms -f “lparu08vir” -m “p8-850-two” -n “lparu08vir”

chsysstate -r lpar -o on -b sms -f “wnd8u01vir” -m “p8-850-one” -n “wnd8u01vir”

chsysstate -r lpar -o on -b sms -f “wnd8u02vir” -m “p8-850-two” -n “wnd8u02vir”

Starting sshd … PRNG is not seeded

Yesterday i applied TL7SP5 to a Aix 6.1 lpar and after reboot it just was inactive on the network…

Log on the lpar through hmc and …surprise , all daemons were stopped..
I thought , just start them … but first of all i’ll start sshd … eheh

root@pprctest:/#startsrc -s sshd
0513-059 The sshd Subsystem has been started. Subsystem PID is 4128828.
root@pprctest:/#PRNG is not seeded
PRNG is not seeded
PRNG is not seeded

mmm i’ll need to investigate , going on searching i try to check permissions on the /dev/random and /dev/urandom files …
but  /dev/*random* devices were missing…….and I had to really need them!

# odmget CuDvDr | grep -p random
CuDvDr:
resource = “ddins”
value1 = “random”
value2 = “32”
value3 = “”

root@pprctest:/# mknod /dev/random c 32 0
root@pprctest:/# mknod /dev/urandom c 32 1
root@pprctest:/# randomctl -l

root@pprctest:/# stopsrc -s sshd

root@pprctest:/# startsrc -s sshd

DSH POWER

Sometimes we need to execute  a command on many aix systems at once, here comes the Distributed SHell utility .
DSH can rely on RSH or SSH to connect to clients and execute commands , obviously nowadays RSH is deprecated so the choice must be SSH.For example a customer requested me to change the timezone format from Posix to Olson for some application compatibility issues .

I wrote the node list in a text file called nodelist (yes i know , i have a lot of fantasy , LOL).
I created a command file called , mhh let’s try to guess…. cmdfile

#cat cmdfile.chgtz
cp /etc/environment /etc/environment.$(date +%Y-%m-%d_%T)
sed ‘s/^TZ.*$/TZ=NFT-1DFT,M3.5.0,M10.5.0/g’ /etc/environment > /etc/environment.new
grep TZ /etc/environment.new
mv /etc/environment.new /etc/environment
echo $TZ

and the shell script dsh_do.sh that do the stuff …reads the cmdfile and gives to it the nodelist as a parameter , one node at a time.

#cat dsh_do.sh

#!/usr/bin/ksh
while read node; do dsh -n $node -e ./cmdfile.chgtz; done < nodelist

Simply the command file makes a backup of the /etc/environment file , do the substitution with sed redirecting the output to a temp file . The temporary .new file is renamed to replace the original.
This solution give me the flexibility to do what i want (specified in cmdfile) on the nodes i want (in nodelist)
without visiting the clients.

Upgrading RHEL 5.6 to 5.8 with YUM

Recently i was committed to update a lab machine from RHEL 5.6 to RHEL 5.8
in order to make it compliant with a new version of flare that the storage team 
has scheduled to deploy on the Clariion.
To do this i used the yum method.
We are using an internal yum server that supply updates for all RHEL releases from 4.6 to 6.2.
So I did a yum update with the original repo file that still pointed to u6 dir on the yum server,
to bring the installed packages to the latest available level.
Later i did a yum clean all to clean the local cached yum files , replaced u6 with u8 in the repo file
and started to evaluate the real upgrade process.
I simulated this by executing “yum update” and answering N at the confirmation question.
After a review of the proposed packages , i am ready to go.
So let’s start the operation measuring also the elapsed time .
Please note that the following yum output is not complete because of its size !

[root@LABSERVER01 backup_config]# time yum -y update

Loaded plugins: rhnplugin, security

This system is not registered with RHN.

RHN support will be disabled.

Skipping security plugin, no data

Setting up Update Process

Resolving Dependencies

Skipping security plugin, no data

–&gt; Running transaction check


Dependencies Resolved


Transaction Summary
================================================================================================================================================================================
Install       4 Package(s)
Upgrade     315 Package(s)

Total download size: 428 M
Downloading Packages:


——————————————————————————————————————————————————————————–
Total                                                                                                                                            18 MB/s | 428 MB     00:23
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

Complete!

real    10m30.912s
user    4m0.240s
sys     1m8.269s

[root@LABSERVER01 backup_config]#

After the completion of the yum update we need to install the kernel-debug package too , because it’s a dependency for oracleasm.
cd /root/ASM/2.6.18-308.8.2/
yum install kernel-debug
rpm -Uvh oracleasm-2.6.18-308.8.2.el5-2.0.5-1.el5.x86_64.rpm oracleasm-2.6.18-308.8.2.el5debug-2.0.5-1.el5.x86_64.rpm oracleasmlib-2.0.4-1.el5.x86_64.rpm oracleasm-support-2.1.7-1.el5.x86_64.rpm
reboot && exit
After the reboot we can verify that the version is really changed , as we can see the redhat-release now it is 5.8 .
[root@LABSERVER01 ~]# uptime
 11:36:47 up 4 min,  1 user,  load average: 0.03, 0.07, 0.03
[root@LABSERVER01 ~]# uname -a
Linux LABSERVER01 2.6.18-308.8.2.el5 #1 SMP Tue May 29 11:54:17 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@LABSERVER01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
[root@LABSERVER01 ~]#
At this point we needed to manually start the EMC PowerPath service , it was really strange…
some investigaion needed !
/etc/init.d/PowerPath start
after powerpath modules load , we can interact through powermt facility
powermt save  file=powermt.save.$(date +%Y%m%d).postupgrade
powermt display dev=all > powermt.display.$(date +%Y%m%d).postupgrade
The modules are not loaded because PowerPath did not start at boot.
In our case the problem was generated by the following paragraph indentation
in / etc / rc.sysinit (!) .
I noticed that the following block of lines was “tabbed” on the right , but i didn’t care about .
###BEGINPP
# Configure and initialize PowerPath.
if [ -f /etc/init.d/PowerPath ]; then
/etc/init.d/PowerPath start
fi
###ENDPP
So i remoevd the unneeded characters (spaces or tabs)  and (magic…) now PowerPath is started normally.
After the reboot i verified that powerpath is loaded and the devices are visible and working correctly.
lsmod | grep -i emc
emcpvlumd              69472  0
emcpxcrypt            166376  0
emcpdm                 75528  0
emcpgpx                55376  3 emcpvlumd,emcpxcrypt,emcpdm
emcpmpx               201160  8
emcp                 2170976  5 emcpvlumd,emcpxcrypt,emcpdm,emcpgpx,emcpmpx
[root@LABSERVER01 ~]# powermt display dev=all
Pseudo name=emcpowerb
CLARiiON ID=CKM00084800353 [SG_LABSERVER]
Logical device ID=600601605FF0220044BF43B27710E111 [LUN 140]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
————— Host —————   – Stor –   — I/O Path —  — Stats —
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   1 qla2xxx                  sdb       SP A2     active  alive       0      0
   1 qla2xxx                  sdd       SP B2     active  alive       0      0
   2 qla2xxx                  sdf       SP B7     active  alive       0      0
   2 qla2xxx                  sdh       SP A7     active  alive       0      0
Pseudo name=emcpowera
CLARiiON ID=CKM00084800353 [SG_LABSERVER]
Logical device ID=600601605FF0220068B2FDD2810FE111 [LUN 135]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
————— Host —————   – Stor –   — I/O Path —  — Stats —
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   1 qla2xxx                  sda       SP A2     active  alive       0      0
   1 qla2xxx                  sdc       SP B2     active  alive       0      0
   2 qla2xxx                  sde       SP B7     active  alive       0      0
   2 qla2xxx                  sdg       SP A7     active  alive       0      0

WWN quick report in AIX os

 

Often we need just a simple info but we’d like to have it in a report ready format .

The following (just2lines-)script greps the fibre channel informations (in this case location code and WWN) 

and displays them .

 

#!/usr/bin/ksh

lscfg | grep fcs

for i in `lscfg -vp |grep fcs| awk ‘{print $1}’`

do

echo $i && lscfg -vp -l $i |grep ‘Network Address’

done

 

These very simple loops can be readapted for any other greppable parameter on the server.

VIOS – Aggiunta dischi

Scenario: 2 sistemi p770 con 4 vios ognuno (2 dedicati scsi e 2 dedicati net)

SU TUTTI I 4 VIOS DEDICATI PER RISORSE SCSI :

oem_setup_env + cfgmgr
oppure
cfgdev (da restricted shell)

verificare che il vio veda le nuove lun
lsdev | grep -i hdisk

I seguenti comandi modificano alcuni parametri dei dischi , se necessari.
Nel mio caso i dischi sono su storage Hitachi.

da shell restricted
chdev -l hdiskXXX -attr pv=yes
chdev -dev hdiskXXX -attr reserve_policy=no_reserve
chdev -dev hdiskXXX -attr queue_depth=2

SOLO SUI VIOS RELATIVI AL SISTEMA OWNER DELLA LPAR
Ora rimane da verificare quale vhost corrisponda alla lpar a cui dobbiamo rendere disponibili i dischi.
In HMC vedo il numero di controller Cxx
in vios shell
lsdev -slots | grep Cxx

ottengo così il vadapter , nel seguente esempio creo i vdev per 3 volumi fisici
che diventeranno parte del rootvg e del pagingvg di una lpar in fase di installazione.

mkvdev -vdev hdisk300 -vadapter vhost11 -dev soa02_rootvg
mkvdev -vdev hdisk301 -vadapter vhost11 -dev soa02paging1
mkvdev -vdev hdisk302 -vadapter vhost11 -dev soa02paging2

Wpars

Annotazioni sulle attività più comuni su wpars.

Le wpars sono la risposta Ibm alle zone Solaris o ai Linux Containers.

Le wpars possono essere Sysem WPAR o Application WPAR , nascono in Aix6.1 .

Alcune delle operazioni più comuni da eseguire su wpar , sono elencate di seguito.

– creare una system wpar da command line :

mkwpar -c -l -D rootvg=yes devname=hdisk3 -n syswpar -N address=11.22.33.44

– listare dettagli di una wpar :

lswpar

lswpar -N – aggiunge dettagli della configurazione di rete

lswpar -L – long listing , output molto dettagliato

– modificare dettagli wpar:

chwpar -A syswpar – modifica la wpar settando l’autoboot all’avvio del sistema global environment.

 

Ovviamente le wpars possono anche essere gestite da smitty , attraverso il fast path smitty wpar.

 

SuseStudio

Built with SUSE Studio

Finalmente mi è arrivato l’account per il SuseStudio Program, richiesto più di un anno fa!

Devo dire che ero estremamente curioso riguardo il lavoro che avrebbe fatto Novell + la comunità Opensuse.

Ma per adesso c’è da leccarsi i baffi, ragazzi.

Linux FileSystems

Ext4 è stato incluso nel kernel , ZFS (per ora solo su FUSE) potrebbe esserlo  a breve .

Lo sviluppo di nuovi file systems non conosce sosta, un ulteriore passo verso l’egemonia di Linux in ambiente Enterprise?

Aumentano le capacità massime di file e partizioni, Sun dice che ZFS consente partizioni “virtualmente illimitate”.

Nascono sempre nuove funzionalità, alcune a dire il vero già presenti in NSS di Novell a fine anni 90.

Cosa ne pensate?

Li avete provati? Li usate in ambienti di produzione?