Buscar este blog

miércoles, 12 de diciembre de 2012

Scripting en VIO Server

En este post explico como ejecutar comandos propios de la CLI del VIO desde la shell de AIX (del VIO Server).

Esto permite definir scripts y ejecutarlos para realizar tareas que de otra forma se tendrían que hacer a mano.

Es un tema que yo ya conocía, y es probable que vosotros también, pero como me ha sido bastante útil hace poco lo pongo en el blog por si a alguno le viene bien.

viernes, 10 de agosto de 2012

Comprobar IPde power system de IBM desde frontal


HOW TO FIND IP ADDRESS ON HMC PORTS

You must first put the physical control panel in manual operating mode before you can select or activate certain functions.
To put the physical control panel in manual operating mode, do the following:
1. Use the Increment button to scroll to function 02.

2. 0 2 _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

3. Press Enter to start function 02.

4. Press Enter again to move to the second character on the function 02 menu. The current system operating mode is displayed with a pointer, as shown in the following example:
5. 0 2 _ _ B _ _ N < _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ P _ _ _

6. Use the Increment button to scroll through the system operating modes, and select M for manual, as shown in the following example:

7. 0 2 _ _ B _ _ M < _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ P _ _ _
8. Press Enter to select the system operating mode.

9. Press Enter again to exit function 02.
The control panel is in manual operating mode.



Function 30: Service processor IP address and port location

This function displays the service processor IP address and port location. This function is available only in the manual operating mode and from power on standby.
Note: If IPv6 is displayed on the control panel, then the service processor's network ports are configured with IPv6 IP addresses. There are not enough characters on the control panel to display the entire address.

So to get to this function , you have to use increment Key to reach 30 and then press enter key to enter the function 30 and reach 00 to get IP address on HMC1 port and 01 to get IP address on HMC2 port.

martes, 29 de mayo de 2012

NIMADM 5.3 a 6.1

Dar de alta un nuevo cliente en NIM:
===========================
Editar /etc/hosts :

En el Nim Master
# vi /etc/hosts
[insertar la linea correspondiente al cliente]

En el clinete
# vi /etc/hosts
[insertar la linea correspondiente al master]

smity nim > Perform NIM Administration Tasks > Manage Machines > Define a Machine >
[Cliente]

Solo Camboiar:

Cable Type        [tp]

Recrear el fichero /etc/niminfo:


# rm /etc/niminfo

# niminit -a name=robin -a master=superman -a master_port=1058


Tareas de la migración por NIM: NIMADM:
================================

Prerrequisitos:
-----------------
Nim Master al máximo nivel de parcheado.
Damos por hecho que en el NIM existe un lppsource y un spot de la version a migrar, generado con smitty bffcreate, desde los dvd originales y posteriormente parcheado.
Comprobar paquetes necesarios en le master
# lslpp -l bos.alt_disk_install.rte   
# nim -o showres 'spotaix61031' | grep bos.alt_disk_install.rte

Procedimiento previo:
----------------------------
Romper mirror en Cliente:
# unmirrorvg roovg.
# reducevg rootvg hdisk1 (migratepv pc si fuera necesario).

Confirmar que todos los lvs de rootvg están open/syncd
#lsvg -l rootvg

Generar un vg en Master, sobre un disco, que sirva de cache. En el servidor NIM. (Tamaño igual que hdisk1 de clinete)
El VG se llamará: nimadmvg, esta creado, pero es necesario que lo elimines y lo vuelvas a crear, para que este vacío:

 # lsvg -l nimadmvg
       nimadmvg:
       LV NAME  TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

En el cliente certificar que tenemos el disco libre, para clonar sobre el:

# lspv        
hdisk0 0000273ac30fdcfc rootvg          active        
hdisk1 000273ac30fdd6e  None

Procedimiento de migración:
-----------------------------------
# nohup ./tarea.sh &

# nimadm -j nimadmvg -c aix1 -s spotaix61031 -l lppsourceaix61031 -d "hdisk1" –Y
  
Donde :
nimadmvg – vg en servidor nim vacio a usar como cache.
aix1 – nombre del objeto cliente nim
spotaix61031 – spot a usar
lppsourceaix61031 – lppsource a usar
hdisk1 – Disco alternativo

EL commando viene de:

smitty nimadm
* Target NIM Client [select your client]
* NIM LPP_SOURCE resource [el lppsource es el de aix61tl6 que ha sido actualizado]
* NIM SPOT resource [select the spot]
* Target Disk(s) to install [select the disk(s) you want to migrate to]
DISK CACHE volume group name []

NIM IMAGE_DATA resource []
NIM BOSINST_DATA resource []
NIM EXCLUDE_FILES resource []
NIM INSTALLP_BUNDLE resource []
NIM PRE-MIGRATION SCRIPT resource []

lunes, 28 de mayo de 2012

Error al crear bosboot Migrando AIX 5.3 TL12 a 6.1 TL6

Tras realizar la migración, por el procedimiento de disco alternativo:
#alt_disk_copy -d hdisk1 (-B si no queremos que el ordende arranque quede modificado).

Se puede producir un error, por el cual , migración queda colgada, y resuelve como error al el sector de arranque, detallando que no encuentra el archivo:

/usr/lib/drivers/pci/sissas64_dd

Solución:

#cp /usr/lib/driver/pci/sissas_dd /usr/lib/driver/pci/sissas64_dd

A continuación reanudar la migración, ya en su punto final.

En mi caso para terminar la actualización aplique los parches de TL7 SP2 y esos dos ficheros que deben existir, son reconfigurados, y desaparecen los problemas.

Importante: Este error, era el causante de que tras la migración por NIMAD, nim con disco alternativo, la maquina fuera incapaz de arrancar desde el disco recientemente migrado. Sin reportar ningún error, solo se quedaba colgada la particion en "Starting Kernel". La causa es corupcion de hd5, por eso no hasta no reconstruir:

# ls -la /usr/lib/driver/pci/sissas64_dd

 no es posible realizar un:

#bosboot -ad hdisk1 correctamente.

Espero sirva de ayuda a quienes tengais problemas parecidos.

Saludos.

jueves, 22 de marzo de 2012

Problemas al aumentar un FS

En ocasiones podemos encontrarnos con ciertos problemas al aumentar un FS que nada tienen que ver con que haya o no espacio disponible en el VG:


cl_chfs: Error executing chfs  -A no -a size="136314880" /basededatos on node system
o
Error detail:
   system: 0516-787 extendlv: Maximum allocation for logical volume lv15
   system:    is 1600.
   system: RETURN_CODE=1
   system: cl_rsh had exit code = 1, see cspoc.log and/or clcomd.log for more
information


Esto se soluciona ejecutando el mandato siguiente

chlv -x<newValue> <LVName>

Por ejemplo, en este caso, para doblar la cantidad que podemos llegar a asignar:

chlv -x 3200 lv15

Visualizar si un dispositivo tiene link

A menudo, es necesario verificar si un dispositivo tiene o no link, por ejemplo cuando pinchamos un cable en una tarjeta de red. Para ello, podemos usar el mandato entstat

Salida de ejemplo


 entstat -d ent3
-------------------------------------------------------------
ETHERNET STATISTICS (ent3) :
Device Type: Gigabit Ethernet-SX PCI-X Adapter (14106802)
Hardware Address: 00:02:55:33:ca:ff
Elapsed Time: 8 days 20 hours 10 minutes 20 seconds

Transmit Statistics:                          Receive Statistics:
--------------------                          -------------------
Packets: 3433434                              Packets: 12711676
Bytes: 8874830048                             Bytes: 9424162450
Interrupts: 0                                 Interrupts: 11286390
Transmit Errors: 0                            Receive Errors: 0
Packets Dropped: 0                            Packets Dropped: 0
                                              Bad Packets: 0
Max Packets on S/W Transmit Queue: 1
S/W Transmit Queue Overflow: 0
Current S/W+H/W Transmit Queue Length: 0

Broadcast Packets: 3469                       Broadcast Packets: 3851695
Multicast Packets: 9367                       Multicast Packets: 65934
No Carrier Sense: 0                           CRC Errors: 0
DMA Underrun: 0                               DMA Overrun: 0
Lost CTS Errors: 0                            Alignment Errors: 0
Max Collision Errors: 0                       No Resource Errors: 0
Late Collision Errors: 0                      Receive Collision Errors: 0
Deferred: 0                                   Packet Too Short Errors: 0
SQE Test: 0                                   Packet Too Long Errors: 0
Timeout Errors: 0                             Packets Discarded by Adapter: 0
Single Collision Count: 0                     Receiver Start Count: 0
Multiple Collision Count: 0
Current HW Transmit Queue Length: 0

General Statistics:
-------------------
No mbuf Errors: 0
Adapter Reset Count: 0
Adapter Data Rate: 2000
Driver Flags: Up Broadcast Running
        Simplex 64BitSupport ChecksumOffload
        PrivateSegment LargeSend DataRateSet

Gigabit Ethernet-SX PCI-X Adapter (14106802) Specific Statistics:
-----------------------------------------------------------------
Link Status : Up
Media Speed Selected: Auto negotiation
Media Speed Running: 1000 Mbps Full Duplex
PCI Mode: PCI-X (100-133)
PCI Bus Width: 64-bit
Latency Timer: 144
Cache Line Size: 128
Jumbo Frames: Disabled
TCP Segmentation Offload: Enabled
TCP Segmentation Offload Packets Transmitted: 259702
TCP Segmentation Offload Packet Errors: 0
Transmit and Receive Flow Control Status: Enabled
XON Flow Control Packets Transmitted: 0
XON Flow Control Packets Received: 0
XOFF Flow Control Packets Transmitted: 0
XOFF Flow Control Packets Received: 0
Transmit and Receive Flow Control Threshold (High): 49152
Transmit and Receive Flow Control Threshold (Low): 24576
Transmit and Receive Storage Allocation (TX/RX): 8/56

miércoles, 1 de febrero de 2012

Añadir almacenamiento, a un VG, a un Cluster Power HA, en caliente

Antes de comenzar, tomamos una foto del estado actual de los discos.

# lspv

Primero presentamos le almacenamiento desde la SAN. A todos los nodos del custer.
Escaneamos desde los dos nodos implicados.

# cfgmgr

Comprobamos el re-escaneo

# lspv

El disco identificado como Nuevo, hdisk[nuevo], tendrá que tener unos parámetros específicos (las siguientes instrucciones hay que realizarlas en ambos nodos):

chdev -l hdisk[nuevo] -a pv=yes
chdev -l hdisk[nuevo] -a hcheck_interval=60
chdev -l hdisk[nuevo] -a reserve_policy=no_reserve

Posteriormente, en nodo activo:

- hacer los cambios:

# extendvg volumegroup hdisk[nuevo]

- desbloquear el VG:

# varyonvg -bu volumegroup

Después, en nodo pasivo:

- importar los cambios:

# importvg -L volumegroup hdisk[nuevo] (un disco del VG)

Para terminar, en nodo activo:

- bloquear de nuevo el VG:

# varyonvg volumegroup

lunes, 30 de enero de 2012

PARADA y ARRANQUE DE MONITORES PowerHA, sin parada de servicio

Para posibles necesidades de actuación sobre una sola base de datos sin necesidad de mover el Grupo de Recursos, y requiriendo VG en Varyon y FS montados.

-------------------------------------------------------

Para detener el monitor de la aplicación:

#smitty hacmp

-> Cluster Management (C-SPOC)
> Resource Groups and Applications
> Suspend/Resume Application Monitoring
> Suspend Application Monitoring and press Enter.

Para Reanudar el monitor de la aplicación:

#smitty hacmp

-> Cluster Management (C-SPOC)
> Resource Groups and Applications
> Suspend/Resume Application Monitoring
> Resume Application Monitoring and press Enter.