mirroring d'un rootvg

Creation: 7 avril 2009
Mise à jour: 20 juillet 2009
Version: 1.1
Author: Jean-Louis Bicquelet-Salaün
Location: http://jlbicquelet.free.fr
Copyright: (c) 2009 Jean-Louis BICQUELET-SALAÜN

mirroring d'un rootvg

description

La procédure qui suit permet de récupérer un disque précédement occupé par un alternate disque install, en vu de l'affecter en mirroir à un rootvg.

procedure

  1. Listez les disques à l'aide de la commande lspv:

    #lspv
    hdisk0          00c20a30664b73e3                    rootvg          active
    hdisk1          00c20a3094ef0e8f                    altinst_rootvg
    hdisk3          none                                None
    hdiskpower0     00c20a30394c12ac                    VG_DATA_ATD     active
    hdisk4          none                                None
    hdisk5          none                                None
    
  2. Ici on voit que le disque local hdisk1 a déjà été utilisé pour un disque alterné. On va le supprimer.

    #alt_disk_install -X
    +-----------------------------------------------------------------------------+
    ATTENTION: calling new module /usr/sbin/alt_rootvg_op. Please see the alt_rootvg_op man page
    and documentation for more details.
    Executing command: {/usr/sbin/alt_rootvg_op -X }
    +-----------------------------------------------------------------------------+
    Bootlist is set to the boot disk: hdisk0
    

    On vérifie que l'opération a bien été effectuée.

    #lspv
    hdisk0          00c20a306a2d744c                    rootvg          active
    hdisk1          00c20a30d2750179                    None
    hdisk2          none                                None
    hdisk4          none                                None
    hdisk5          none                                None
    hdiskpower0     00c20a30bffb0bcb                    VG_NIM          active
    

    On peut éventuellement effacer le pvid de hdisk1 (mais ce n'est pas forcément indispensable).

    #chdev -l hdisk1 -a pv=clear
    
    lspv
    hdisk0          00c20a30664b73e3                    rootvg          active
    hdisk1          none                                None
    hdisk3          none                                None
    hdiskpower0     00c20a30394c12ac                    VG_DATA_ATD     active
    hdisk4          none                                None
    hdisk5          none                                None
    
  3. Etendez le rootvg avec le disque libre. Vous pouvez être amené à utiliser l'option -b pour étendre le volume groupe.

    #extendvg rootvg hdisk1
    0516-1398 extendvg: The physical volume hdisk1, appears to belong to
    another volume group. Use the force option to add this physical volume
    to a volume group.
    0516-792 extendvg: Unable to extend volume group.
    #extendvg -f rootvg hdisk1
    
  4. Mirrorez le nouveau disque (hdisk1) de rootvg:

    mirrorvg rootvg hdisk1
    0516-1124 mirrorvg: Quorum requirement turned off, reboot system for this
            to take effect for rootvg.
    0516-1126 mirrorvg: rootvg successfully mirrored, user should perform
            bosboot of system to initialize boot records.  Then, user must modify
            bootlist to include:  hdisk0 hdisk1.
    
  5. Une fois ceci fait, recréez les images de boot et modifiez la bootlist:

    #bosboot -ad /dev/hdisk0
    
    bosboot: Boot image is 30282 512 byte blocks.
    #bosboot -ad /dev/hdisk1
    
    bosboot: Boot image is 30282 512 byte blocks.
    
    #bosboot -ad /dev/ipldevice
    
    bosboot: Boot image is 30282 512 byte blocks.
    
    #bootlist -m both hdisk0 hdisk1
    #bootlist -m both -o
    hdisk0 blv=hd5
    hdisk1
    hdisk0 blv=hd5
    hdisk1
    
  6. Il reste à vérifier que rootvg contient bien 2 disques, et que les volumes logiques sont mirrorés. Il faut regarder la colonne PVs qui doit être à deux.

    Dans le cas présent, les volumes de dumps sont répartis sur les deux disques, ce qui est plutot une bonne chose.

    #lsvg -p rootvg
    rootvg:
    PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
    hdisk0            active            546         332         83..87..35..18..109
    hdisk1            active            546         348         109..65..00..65..109
    #lsvg -l rootvg
    rootvg:
    LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
    hd5                 boot       1     2     2    closed/syncd  N/A
    hd6                 paging     16    32    2    open/syncd    N/A
    hd8                 jfslog     1     2     2    open/syncd    N/A
    hd4                 jfs        6     12    2    open/syncd    /
    hd2                 jfs        19    38    2    open/syncd    /usr
    hd9var              jfs        4     8     2    open/syncd    /var
    hd3                 jfs        2     4     2   open/syncd    /tmp
    lv_agora            jfs        2     4     2   open/syncd    /Agora
    hd10opt             jfs        1     2     2   open/syncd    /opt
    lg_dumplv           sysdump    8     8     1    open/syncd    N/A
    lv_dbtsm            jfs        120   240   2    open/syncd    /DBTSM
    lg_dumplv1          sysdump    8     8     1    open/syncd    N/A
    lv_ltmp             jfs        6     12    2    open/syncd    /ltmp
    lv_home_exp         jfs        4     8     2    open/syncd    /home/exploit
    lv_home             jfs        4     8     2    open/syncd    /home
    lv_soft             jfs        12    24    2    open/syncd    /SOFT