installation d'AIX par la methode de disque_alterne

Mise à jour: 16 decembre 2008
Version: 1.0
Author: Jean-Louis Bicquelet-Salaün
Location: http://jlbicquelet.free.fr
Copyright: (c) 2008 Jean-Louis BICQUELET-SALAÜN

création d'un disque de boot alterné

Cette procédure permet de cloner un système AIX sur un nouveau disque. Cela permet de faire une copie de sécurité, ou d'installer un système similaire à un système existant pour ensuite attacher ce disque (surtout dans un environnement partitionnable) à un autre serveur qui pourra ainsi directement démarrer.

procédure initiale

Cherchez un disque libre. (ici hdisk1 ou hdisk2).

#lspv
hdisk0          00c1719e64ded2fa                    rootvg          active
hdisk1          00c1719e74e1d549                    None
hdisk2          00c1719eae51856d                    None

On clone le rootvg existant sur le disque hdisk1.

#alt_disk_install -C hdisk1
+-----------------------------------------------------------------------------+
ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the alt_disk_copy man page
and documentation for more details.
Executing command: {/usr/sbin/alt_disk_copy -d "hdisk1"}
+-----------------------------------------------------------------------------+
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 /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 files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the
alternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...
Bootlist is set to the boot disk: hdisk1

On peut éventuellement changer la bootlist, car par défaut c'est le nouveau disqu qui est utilisé.

#bootlist -m normal hdisk0

Verifiez:

#bootlist -m normal -o
hdisk0 blv=hd5
#lspv
hdisk0          00c1719e64ded2fa                    rootvg          active
hdisk1          00c1719e74e1d549                    altinst_rootvg
hdisk2          00c1719eae51856d                    None

Le disque de boot de secours est prêt (altinst_rootvg).

options

Alt_disk_install peut s'utiliser de plusieures manières:

alt_disk_install -C hdisk1clone du disqueclonage
alt_disk_install -C -B hdisk1clonage du disque sans mise à jour de la bootlistclonage
alt_disk_install -d /Install/mksysb_SYST clonage à partir d'un mksysbclonage
alt_disk_install -d -O /Install/mksysb_SYSTclonage à partir d'un mksysb avec recherche de nouveau périphériquesinstallation d'un nouveau serveur
alt_disk_install -v alt_disk_432 hdisk2modifie le nom d'un disque alternémaintenance
alt_disk_install -Xsuppression d'un disque alternémaintenance
alt_disk_install -W hdisk1wake up un ancien rootvg après boot sur un disque alternémaintenance
alt_disk_install -Sput to sleep un ancien rootvgmaintenance

nettoyage des installations précédente

Lorsqu'un disque alterné a été installé sur un système, il est necessaire de supprimer le disque alterné, avant de pouvoir recommencer l'opération.

On commence par regarder les disques affectés aux disques alternés grace à la commande lspv.

#lspv |head -n 2
hdisk0          00384f0cabd863e3                    old_rootvg
hdisk1          00384f0cbb8fd036                    rootvg          active
Pour supprimer un disque alterné soit le nom du volume groupe est:
  • altinst_rootvg On passe la commande alt_disk_install -X
  • old_rootvg On passe la commande alt_disk_install -X old_rootvg

maintenance

On peut effectuer un wake up pour qu'il redevienne disque alterné en vu de maintenance. Le volume groupe est alors monté sur le répertoire /alt_inst.

# lspv
hdisk0          00384f0cabd863e3     old_rootvg
hdisk1          00384f0cbb8fd036     rootvg
# alt_disk_install -W hdisk0
# lspv
hdisk0          00384f0cabd863e3     altinst_rootvg
hdisk1          00384f0cbb8fd036     rootvg

Pour démonter les filesystems du volume groupe, et ne plus rendre accessible ceux-ci on effectue un "put to sleep":

alt_disk_install -S