Affichage des articles dont le libellé est vio server. Afficher tous les articles
Affichage des articles dont le libellé est vio server. Afficher tous les articles

jeudi 18 octobre 2012

Be sure to be on different switchs !

It's good to have more than one fcs adapter... but it's better to be sure they are connected on different switchs !
Each id is different, if it is on another switch

in this case we have two  adapters (or 2 ports on the same card):

root:/# lsdev -c adapter | grep fcs
fcs0   Available 30-T1 Virtual Fibre Channel Client Adapter
fcs1   Available 31-T1 Virtual Fibre Channel Client Adapter


but on the same vio server ! ....

root:/# echo "vfcs" | kdb
           START              END
0000000000001000 0000000005770000 start+000FD8
F00000002FF47600 F00000002FFDF9C0 __ublock+000000
000000002FF22FF4 000000002FF22FF8 environ+000000
000000002FF22FF8 000000002FF22FFC errno+000000
F1000F0A00000000 F1000F0A10000000 pvproc+000000
F1000F0A10000000 F1000F0A18000000 pvthread+000000
read vscsi_scsi_ptrs OK, ptr = 0xF1000000C01A9380
(0)> vfcs
NAME      ADDRESS             STATE   HOST      HOST_ADAP  OPENED NUM_ACTIVE
fcs0      0xF10001019999A000  0x0008  vioprex1vfchost2  0x01    0x0000
fcs1      0xF10001019A3AC000  0x0008  vioprex1vfchost3  0x01    0x0000
and on the same swicth !!!


root:/# lsattr -El fscsi0
attach       switch    How this adapter is CONNECTED         False
dyntrk       yes       Dynamic Tracking of FC Devices        True
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True
scsi_id      0x340206  Adapter SCSI ID                       False
sw_fc_class  3         FC Class for Fabric                   True

root:/# lsattr -El fscsi1
attach       switch    How this adapter is CONNECTED         False
dyntrk       yes       Dynamic Tracking of FC Devices        True
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True
scsi_id      0x340501  Adapter SCSI ID                       False
sw_fc_class  3         FC Class for Fabric                   True



this other partition is ok :

# lsattr -El fscsi0
attach       switch    How this adapter is CONNECTED         False
dyntrk       yes       Dynamic Tracking of FC Devices        True
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True
scsi_id      0x1db40   Adapter SCSI ID                       False
sw_fc_class  3         FC Class for Fabric                   True

# lsattr -El fscsi1
attach       switch    How this adapter is CONNECTED         False
dyntrk       yes       Dynamic Tracking of FC Devices        True
fc_err_recov fast_fail FC Fabric Event Error RECOVERY Policy True
scsi_id      0x20db40  Adapter SCSI ID                       False
sw_fc_class  3         FC Class for Fabric                   True


Merci Patrice, pour l'info !

how to find the underlying vio server

I need to know, from a partition, how to find which vio server it relies on :

We need to use kdb  : 

on Npiv servers

root @test #  echo "vfcs" | kdb
           START              END
0000000000001000 0000000004090000 start+000FD8
F00000002FF47600 F00000002FFDF9C0 __ublock+000000
000000002FF22FF4 000000002FF22FF8 environ+000000
000000002FF22FF8 000000002FF22FFC errno+000000
F1000F0A00000000 F1000F0A10000000 pvproc+000000
F1000F0A10000000 F1000F0A18000000 pvthread+000000
read vscsi_scsi_ptrs OK, ptr = 0x0
(0)> vfcs
NAME      ADDRESS             STATE   HOST      HOST_ADAP  OPENED NUM_ACTIVE
fcs0      0xF1000A0000156000  0x0008  vioserver1vfchost0  0x01    0x0000

root @test # 

on vscsi servers

root @test #  echo "cvai" | kdb | grep vscsi
Preserving 30612 bytes of symbol table [./usr/lib/drivers/vscsi_initdd]
read vscsi_scsi_ptrs OK, ptr = 0xF1000000A0138378
vscsi0     0x000007 0x0000000000 0x0                vio73->vhost7
vscsi1     0x000007 0x0000000000 0x0                vio74->vhost7

mercredi 3 juin 2009

useful hmc commands

lspartition -dlpar <= Active <1> for partition to accept commands.



if not 1, then, on the partition :

partition :root / # /usr/sbin/rsct/bin/rmcctrl -z

partition :root / # /usr/sbin/rsct/install/bin/recfgct

0513-071 The ctcas Subsystem has been added.

partition :root / # /usr/sbin/rsct/bin/rmcctrl -s

0513-071 The ctrmc Subsystem has been added.

0513-059 The ctrmc Subsystem has been started.

Subsystem PID is 401430.

partition :root / # /usr/sbin/rsct/bin/rmcctrl -p





Migrate lpar (live mobility) :

migrlpar -o m -m P570origine -t P520destination -p Partitionabasculer



Migrate lpar (from /to MSP):

migrlpar -o v -m srcSystem -t destSystem -p myLPAR –I source_msp_id=2,dest_msp_name=S2_VIOS2

List all the systems :

lssyscfg -r sys -F name

List the scsi devices defined for a partition :

lssyscfg -r prof -m P570 --filter "lpar_names=darecb1" -F lpar_id,virtual_scsi_adapters

List all the defined scsi devices for a physical server :

lshwres -r virtualio --rsubtype scsi -m P570 --level lpar -F lpar_name,lpar_id,slot_num,remote_lpar_id,remote_slot_num --header


mercredi 6 mai 2009

Beware of the storm...

While configuring two vio server the other day, i wanted to transform both vio server SEA cards into SEA failover mode. I fell into the following trap :


If one Vio server is configured as followed :

1 virtual ethernet in vlan / pvid 1 with external network access yes, and trunk pri 1

SEA created between the adapter and this card, and, an internal adress configured on the SEA.


While configuring the other VIO server, in the same way than the first one, in order to transform it in failover mode, later, when you create the SEA adapter (with the virtual adapter on the same Vlan / pvid than the first vio server), you generate a biiig arp storm / broadcast storm, that can put your vlan, and more, down.


So, the good way to do it is to make directly the failover mode, as you create the SEA, or, to transform it before creating the second SEA on the second VIO server.


NOT : mkvdev -sea ent1 -vadapter ent4 -default ent4 -defaultid 3

but directly

mkvdev -sea ent1 -vadapter ent4 -default ent4 -defaultid 3 ha_mode=auto ctl_chan=ent3


Before, you should have the virtual adapter ent3 created, on vlan 3.


OR : if you just need to modify your existing SEA into failover mode :


chdev -dev ent3 -attr ha_mode=auto ctl_chan=ent4


there seems also to be a bypass at the switch level, which could be helpful : its the BPDU guard setting, which disables the port if bridging loop or packet storm occurs.



This is what it looks like at the end (2 differents networks for every partition)



lundi 20 avril 2009

Who's disk is it ??

If you have a no pvid disk, defined in a partition, how do you find which one it is, on the VIO server ?
1) on the aix partition :
# lscfg -l hdiskX
=> hdiskX U8203.xx.... V3-
C2-T1-L810000.... Virtual...
Slot
Lun
2) Get the AIX client ID :
# uname -L
3 PartitonName
Partion ID
3) On which Vio server is running the partition :
Log on the HMC :
# lssyscfg -r sys -F name <= gives all the managed system names #lshwres -m
PowerName -r virtualio --rsubtype scsi --filter lpar_ids=3
Powersystem on which the partition is running
Partion ID in 2)

=>lpar_name=PartitionName,lpar_id=3,slot_num=2,state=1,is_required=1,adapter_type=client,remote_lpar_id=1,remote_lpar_name=VioServerName,remote_slot_num=12,backing_devices=none
Remote Slot number
4) Log on the Vio Server (padmin)
# lsmap -all
note which adapter (
vhostX) is on the slot number 12
# lsmap -vadapter vhostX
=> the disk you are looking for, is the one with the Lun Id 810000 in 1)

vendredi 17 avril 2009

Ajouter des disques dans une partition virtuelle

Méthode ajout de disque sur VIO server (lorsqu'il y a 2 vio serveurs, qui peuvent éventuellement récupérer les partitions en live mobility):

1) faire ajouter les disques sur les cartes fcs des vio servers
2) Sur le premier vio server

  • Se logger padmin
  • lspv => tous les disques doivent avoir un pvid, si ça n'est pas le cas, il faut faire un chdev -l hdiskx -a pv=yes en oem_setup_env ou bien chdev -dev hdiskx -attr pv=yes en padmin
  • cfgdev
  • lspv grep none awk '{ print "chdev -dev "$1" -attr pv=yes reserve_policy=no_reserve algorithm=round_robin" }'
  • récuperer l'output avec la souris et executer toutes les lignes (paste via la souris par exemple)


A ce stade les disques sont prêts sur le 1er vio server

3) se connecter sur le 2eme vio server, en padmin

  • lspv
  • cfgdev
  • passer, pour chaque disque supplémentaire, la commande suivante : (ou la commande ci dessus)
    chdev -dev hdiskX -attr reserve_policy=no_reserve algorithm=round_robin

    4) Maintenant, il faut définir les disques sur le serveur lui-même (la partition cible)
  • lancer IE : https://adresse/ de la hmc
  • Accepter la license s'il vous la propose et autoriser les popup pour ce site
    cliquer sur :


    log on and launch the hardware management console console

  • se connecter hscroot
    éventuellement, s'il le propose lancer une nouvelle session
    séléctionner le systeme concerné, dans systeme management :




  • cliquer sur properties (ou propriétés)
  • onglet "Virtual adapter" (ou la meme chose en francais!!)
  • relever la valeur du "connecting adapter", correspondant à la carte SCSI par laquelle on va voir le disque (ici, 15)




    5) définition sur le vio server

retourner sous le vio serveur hébergeant la partition

  • lsmap -all grep vhost
  • relever la carte comportant le numéro correspondant, (le vhost correspondant) et passer la commande suivante, pour y attribuer le ou les disques correspondants :
    mkvdev -vdev hdiskxx -vadapter vhostx
    ensuite, la méthode de définition sous la partition est classique.

Attention : il est prudent de vérifier les pvid obtenus sur la partition, pour les comparer avec ceux du vio serveur

Tuning Vio server

All commands as padmin :

lsdev -dev ent3 -attr thread
ent3=SEA

if 1 => threaded, else, not threaded.
Being threaded, is better for the disks i/o (better handled), counterpart is the cpu overhead.

entstat -all ent3
if thread queue overflow packet more than 0, then the vio server is overcharged.

Vio server commands

-List virtual adapters (padmin) :

lsdev -virtual

-list adapters (padmin):

lsdev -type adapter

-list virtual network adapters (padmin):

lsmap -all -net

-list all pci adapters (oem_setup_env):

lsslot -c pci

- list all parents for an adapter (oem_setup_env):

lsparent -Cl fcs0

- list all children from an adapter (oem_setup_env):

lsdev -p pci0

- list all free disks (padmin):

lspv -free

- list Vio level

ioslevel

- save config disk in crontab to a mailing list (in order to rebuild the config in case of a crash) (oem_setup_env):

0 0 * * * export HOST=$(hostname);/home/padmin/mapluns.sh uuencode recreation_mapping mail -s "configuration vio server $HOST " root

root is an alias in /etc/aliases pointing to a real user address (toto@aaaa.fr)

- create a SEA adapter between ent1 (physical adapter) and ent2 (virtual adapter) (padmin) :

mkvdev -sea ent1 -vadapter ent2 -default ent2 -defaultid 1 <= creates ent3

and then ...

cfgassist <= config ent3

- create a virtual disk for a partition with hdisk6 (padmin) :

mkvdev -vdev hdisk6 -vadapter vhost0 -dev prex0rootvg

-create a virtual cdrom (padmin) :

mkvdev -vdev cd0 -vadapter vhost3 -dev cd