Buscar este blog

lunes, 14 de febrero de 2011

Clonado de Discos # alt_disk_install

# alt_disk_install -B -C hdisk2
+----------------------------------------------------------------------+
ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the
alt_disk_copy man pageand documentation for more details.
Executing command: {/usr/sbin/alt_disk_copy -O -B -d "hdisk2"}

+----------------------------------------------------------------------+
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd9var
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd10opt
Creating logical volume alt_lg_dumplv
Creating /alt_inst/ file system.
Creating /alt_inst/home file system.
Creating /alt_inst/opt file system.
Creating /alt_inst/tmp file system.
Creating /alt_inst/usr file system.
Creating /alt_inst/var file system.
Generating a list of filesfor backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to thealternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the newsystem console.
[...]


Esta operación, en un sistema POWER5 con carga al 60% el tiempo, no baja de 30 minutos. Al finalizar con "lspv" veremos:


# lspv
hdisk0 00c4b08edd400579 rootvg active
hdisk1 none none
hdisk2 00c4b08e0e0397d7 altinst_rootvg

El disco hdisk2 es en estos momentos totalmente bootable, lo que quiere decir que en caso de catástrofe solo tenemos que entrar en el SMS e indicar éste disco como de BOOT.

Posteriormente se pueden aplicar actualizaciones (ver cómo obtener actualizaciones eficientemente) con otro comando de la familia:

# alt_rootvg_op -C -b update_all -l /repos/aix53-ml5-03
Installing optional filesets or updates into alt_inst_rootvg...
install_all_updates: Initializing system parameters.
install_all_updates: Log file is /var/adm/ras/install_all_
updates.log
install_all_updates: Checking for updated install utilities on media.
install_all_updates: Updating install utilities to latest level on media.
+------------------------------------------------------------------+
Pre-installation Verification
...

+------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

Otras formulaciones similares:

# alt_disk_copy -P'all' -d hdisk2 -b update_all -l /repos/aix53-ml5-03
# alt_disk_install -C -B -f /tmp/lista-apar.txt -l /repos/aix-apars hdisk2



Instalación de AIX desde un CLON


Visto todo lo anterior si añadimos "-O" al comando tendremos un AIX idéntico al de nuestro servidor pero sin personalización de hardware y dispositivos (casi "limpio"). Los ficheros de configuración habituales del /etc y los usuarios si que se conservan, de manera que hay que tener esa precaución. El comando queda así:

# alt_disk_install -O -B -C hdisk2


Si el disco hdisk2 es un disco externo, podemos asignarlo a otro servidor con la posibilidad de ponerse a explotar la copia en tiempo record. Sumando ésto con la virtualización tendremos un servidor funcionando en pocas horas tan operativo y actualizado como el que escojamos para clonar.

1 comentario: