|  Les deux révisions précédentes Révision précédente Prochaine révision |  Révision précédente | 
| informatique:informatique:exadata:patching [2023/11/08 13:08]  –  ben | informatique:informatique:exadata:patching [2023/11/29 07:07] (Version actuelle)  –  ben | 
|---|
| Page de référence :  |   * **[[informatique:exadata:patching_exa|Patching Exadata]]**  | 
|   |   * **[[informatique:exadata:patching_zdlra|Patching ZDLRA]]** | 
| [[https://support.oracle.com/epmos/faces/DocContentDisplay?id=888828.1|Exadata Database Machine and Exadata Storage Server Supported Versions (Doc ID 888828.1)]]  |  | 
|   |  | 
| 5 composants à patcher :   |  | 
|   |  | 
|   * KVM host & VM -> Nodes  |  | 
|   * Storage Cell - > Cells  |  | 
|   * RoCE switches -> Sw  |  | 
|   * dbnu   |  | 
|   * GI  |  | 
|   |  | 
| Exemple (09/2023) :  |  | 
|   |  | 
| <code>  |  | 
| ### Nodes ### p35667496_221000_Linux-x86-64.zip  |  | 
| ### Cells ### p35767204_221000_Linux-x86-64.zip  |  | 
| ### Sw    ### p35468771_221000_Linux-x86-64.zip  |  | 
| ### dbnu  ### p21634633_231500_Linux-x86-64.zip  |  | 
| ### GI    ### p35755646_1920000DBRU_Linux-x86-64.zip + p35319490_190000_Linux-x86-64.zip + p35656840_1920000DBRU_Linux-x86-64.zip  |  | 
| </code>  |  | 
|   |  | 
| ===== 00_prepare =====  |  | 
| <code>  |  | 
| cp /mnt/patches/repository/patch.conf.no2yy86.2207 /mnt/patches/repository/patch.conf.no2yy86.2207.backup  |  | 
| cp /mnt/patches/repository/patch.conf.pc2yy55.2207 /mnt/patches/repository/patch.conf.pc2yy55.2207.backup  |  | 
|   |  | 
| cp /mnt/patches/repository/patch.conf.no2yy86.2207 /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| cp /mnt/patches/repository/patch.conf.pc2yy55.2207 /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
|   |  | 
| sed -i "s/22.1.2/22.1.15/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/220816/230901/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/7.0(3)I7(9)/10.2(4)/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/p34388153_221000_Linux-x86-64.zip/p35667496_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/FILES_PATCHBASE=p20629338_212000_Linux-x86-64.zip/FILES_PATCHBASE=p20629338_231300_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/FILES_CELL=p34483757_221000_Linux-x86-64.zip/FILES_CELL=p35767204_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/FILES_OPATCH=p6880880_122010_Linux-x86-64.zip/FILES_OPATCH=p6880880_190000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
| sed -i "s/FILES_SWITCH=p34388152_221000_Linux-x86-64.zip/FILES_SWITCH=p35468771_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.no2yy86.2310  |  | 
|   |  | 
| sed -i "s/22.1.2/22.1.15/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/220816/230901/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/7.0(3)I7(9)/10.2(4)/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/p34388153_221000_Linux-x86-64.zip/p35667496_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/FILES_PATCHBASE=p20629338_212000_Linux-x86-64.zip/FILES_PATCHBASE=p20629338_231300_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/FILES_CELL=p34483757_221000_Linux-x86-64.zip/FILES_CELL=p35767204_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/FILES_OPATCH=p6880880_122010_Linux-x86-64.zip/FILES_OPATCH=p6880880_190000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
| sed -i "s/FILES_SWITCH=p34388152_221000_Linux-x86-64.zip/FILES_SWITCH=p35468771_221000_Linux-x86-64.zip/g" /mnt/patches/repository/patch.conf.pc2yy55.2310  |  | 
|   |  | 
| #nohup /opt/oracle.ahf/exachk/exachk -a -clusternodes `cat $HOME/dbs_group | awk '{print $1}'|xargs| sed -e 's/ /,/g'` -s &> /tmp/exachk_`date +%Y-%m-%d_%H-%M`.log &  |  | 
|   |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group 'cellcli -e list physicaldisk' | grep -v normal  |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group 'cellcli -e list celldisk' | grep -v normal  |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group 'cellcli -e list griddisk attributes name,asmmodestatus,asmdeactivationoutcome' | grep -vi yes  |  | 
|   |  | 
| ### cleanup  |  | 
| dcli -l root -g $HOME/dbs_group 'mkdir -p /EXAVMIMAGES/patches'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al /EXAVMIMAGES/patches'  |  | 
| #dcli -l root -g $HOME/dbs_group 'rm -rf /EXAVMIMAGES/patches/*'  |  | 
| #dcli -l root -g $HOME/dbs_group 'rm -rf /EXAVMIMAGES/patches/.*'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al  /EXAVMIMAGES/patches'  |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group 'mkdir -p /u01/patches'  |  | 
| #dcli -l root -g $HOME/guests_group 'rm -rf /u01/patches/*'  |  | 
| #dcli -l root -g $HOME/guests_group 'rm -rf /u01/patches/.*'  |  | 
| dcli -l root -g $HOME/guests_group 'ls -al  /u01/patches'  |  | 
| dcli -l root -g $HOME/guests_group 'df -hP|grep /u01/patches'  |  | 
|   |  | 
|   |  | 
| ##mycmd## dcli -l root -g $HOME/dbs_group  'dbmcli -e list alerthistory'  |  | 
| ##mycmd## dcli -l root -g $HOME/guests_group 'dbmcli -e list alerthistory'  |  | 
|   |  | 
| ##mycmd## dcli -l root -g $HOME/dbs_group 'dbmcli -e drop alerthistory all'  |  | 
| ##mycmd## dcli -l root -g $HOME/guests_group 'dbmcli -e drop alerthistory all'  |  | 
|   |  | 
| ---------------------- ##mycmd## ipmitool bmc reset cold  |  | 
| ---------------------- ##mycmd## dcli -l root -g $HOME/cell_group ipmitool bmc reset cold  |  | 
|   |  | 
|   |  | 
| vi /EXAVMIMAGES/patches/screenrc  |  | 
|   |  | 
| hardstatus alwayslastline "%{= RY}%H %{kG}%{G} kompo.0: %{c}%w %=%{kG}%c:%s %D, %M %d %Y "  |  | 
| defscrollback 5000  |  | 
| deflog on  |  | 
| logfile screenlog_kompo.0  |  | 
| sessionname kompo.0  |  | 
|   |  | 
| cd /EXAVMIMAGES/patches  |  | 
| screen -c /EXAVMIMAGES/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group -f /EXAVMIMAGES/patches/screenrc -d /EXAVMIMAGES/patches/screenrc  |  | 
| dcli -l root -g $HOME/guests_group -f /EXAVMIMAGES/patches/screenrc -d /u01/patches/screenrc  |  | 
|   |  | 
| ### OH patcher  |  | 
| dcli -l root -g $HOME/guests_group 'ls -al /mnt/patches/repository/p20629338_231300_Linux-x86-64.zip'  |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /mnt/patches/repository/p20629338_231300_Linux-x86-64.zip -d /u01/patches'  |  | 
| dcli -l root -g $HOME/guests_group 'ls -al /u01/patches'  |  | 
| dcli -l root -g $HOME/dbs_group 'unzip -qo /mnt/patches/repository/p20629338_231300_Linux-x86-64.zip -d /EXAVMIMAGES/patches'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al  /EXAVMIMAGES/patches'  |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group -f /mnt/patches/repository/patch.conf.no2yy86.2310 -d /u01/patches/conf/patch.conf  |  | 
| dcli -l root -g $HOME/dbs_group -f /mnt/patches/repository/patch.conf.no2yy86.2310 -d /EXAVMIMAGES/patches/conf/patch.conf  |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group -f /mnt/patches/repository/patch.conf.pc2yy55.2310 -d /u01/patches/conf/patch.conf  |  | 
| dcli -l root -g $HOME/dbs_group -f /mnt/patches/repository/patch.conf.pc2yy55.2310 -d /EXAVMIMAGES/patches/conf/patch.conf  |  | 
|   |  | 
| ### OS  |  | 
| dcli -l root -g $HOME/guests_group 'mkdir -p /u01/patches/tmp/'  |  | 
| dcli -l root -g $HOME/guests_group 'mkdir /u01/patches/patches'  |  | 
| dcli -l root -g $HOME/dbs_group 'mkdir /EXAVMIMAGES/patches/tmp'  |  | 
| dcli -l root -g $HOME/dbs_group 'mkdir /EXAVMIMAGES/patches/patches'  |  | 
|   |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group 'ls -al /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip'  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group 'cp /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip /EXAVMIMAGES/patches/patches/'  |  | 
| dcli -l root -g $HOME/guests_group 'cp /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip /u01/patches/patches/'  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group 'cp /mnt/patches/repository/p35853251_2211500_Linux-x86-64.zip /EXAVMIMAGES/patches/patches/'  |  | 
| dcli -l root -g $HOME/guests_group 'cp /mnt/patches/repository/p35853251_2211500_Linux-x86-64.zip /u01/patches/patches/'  |  | 
|   |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group 'ls -al  /u01/patches/patches/'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al /EXAVMIMAGES/patches/patches/'  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group 'cp /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip /EXAVMIMAGES/patches/patches/'  |  | 
| dcli -l root -g $HOME/guests_group 'cp /mnt/patches/repository/p35667496_221000_Linux-x86-64.zip /u01/patches/patches/'  |  | 
|   |  | 
| ### dbnu  |  | 
| dcli -l root -g $HOME/guests_group 'ls -al /mnt/patches/repository/p21634633_231500_Linux-x86-64.zip'  |  | 
| dcli -l root -g $HOME/dbs_group 'ls -al /mnt/patches/repository/p21634633_231500_Linux-x86-64.zip'  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group "unzip -o -j -d /EXAVMIMAGES/patches/patches /mnt/patches/repository/p21634633_231500_Linux-x86-64.zip '*dbnodeupdate.zip'"  |  | 
| dcli -l root -g $HOME/dbs_group 'unzip -qo /EXAVMIMAGES/patches/patches/dbnodeupdate.zip -d /EXAVMIMAGES/patches/bin/dbnu'  |  | 
| dcli -l root -g $HOME/dbs_group 'bash -c "export gc_patch_base=/EXAVMIMAGES/patches;source /EXAVMIMAGES/patches/lib/constants.sh;source /EXAVMIMAGES/patches/lib/log_message.sh;source /EXAVMIMAGES/patches/lib/checkDBnodeupdate.sh;checkDBnodeupdate;exit"'  |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group "unzip -o -j -d /u01/patches/patches /mnt/patches/repository/p21634633_231500_Linux-x86-64.zip '*dbnodeupdate.zip'"  |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /u01/patches/patches/dbnodeupdate.zip -d /u01/patches/bin/dbnu'  |  | 
| dcli -l root -g $HOME/guests_group 'bash -c "export gc_patch_base=/u01/patches;source /u01/patches/lib/constants.sh;source /u01/patches/lib/log_message.sh;source /u01/patches/lib/checkDBnodeupdate.sh;checkDBnodeupdate;exit"'  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group '/EXAVMIMAGES/patches/bin/dbnu/dbnodeupdate.sh -V'  |  | 
| dcli -l root -g $HOME/guests_group '/u01/patches/bin/dbnu/dbnodeupdate.sh -V'  |  | 
|   |  | 
| #### Cells  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group 'unzip -qo /mnt/patches/repository/p35767204_221000_Linux-x86-64.zip -d /EXAVMIMAGES/patches/tmp'  |  | 
|   |  | 
| #### OH  |  | 
| dcli -l root -g $HOME/guests_group 'mkdir -p /u01/patches/tmp/OPATCH_12'  |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /mnt/patches/repository/p6880880_190000_Linux-x86-64.zip -d /u01/patches/tmp/OPATCH_12/'  |  | 
| dcli -l root -g $HOME/guests_group -f /mnt/patches/repository/p6880880_190000_Linux-x86-64.zip -d /u01/patches/patches/  |  | 
|   |  | 
|   |  | 
| ###19.20 GI  |  | 
|   |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /mnt/patches/repository/p35319490_190000_Linux-x86-64.zip -d /u01/patches/tmp/'  |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /mnt/patches/repository/p35656840_1920000DBRU_Linux-x86-64.zip -d /u01/patches/tmp/'  |  | 
| dcli -l root -g $HOME/guests_group 'unzip -qo /mnt/patches/repository/p35755646_1920000DBRU_Linux-x86-64.zip -d /u01/patches/tmp/'  |  | 
|   |  | 
|   |  | 
| ### Checks espace disque  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group 'df -h /EXAVMIMAGES'  |  | 
| dcli -l root -g $HOME/guests_group 'df -h /u01/patches'  |  | 
| dcli -l root -g $HOME/guests_group 'df -h /u01/app/19.0.0.0/grid/'  |  | 
| </code>  |  |