|  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:11]  –  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>  |  | 
|   |  | 
| ===== 02_DBNodesOS =====  |  | 
|   |  | 
| <code>  |  | 
| ### on KVM Host  |  | 
| cd /EXAVMIMAGES/patches  |  | 
| screen -c /EXAVMIMAGES/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
| ##mycmd## cd /EXAVMIMAGES/patches/bin  |  | 
| ##mycmd## ./precheck.sh -skip_switches -recheck_all  |  | 
| ##mycmd## egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$'  `find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*"  | xargs ls -altrt | tail -1| awk -F' ' '{print $9}'`  |  | 
|   |  | 
| ##mycmd## ### find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*" -exec ls -rlt {} \+;  |  | 
| ##mycmd## ### egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$'   |  | 
| ##mycmd## egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$'  `find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*"  | xargs ls -altrt | tail -1| awk -F' ' '{print $9}'`  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list --vcpu --memory  |  | 
|   |  | 
| 2023-Oct-31 09:26:03 UTC [FAIL]     *** no2yy861: Free space on /EXAVMIMAGES filesystem. Required: 157286400K  Available: 121028420K  |  | 
| 2023-Oct-31 09:33:01 UTC [FAIL]     *** no2yy862: The active and inactive lvm size are NOT equal  |  | 
| => ne pas tenir compte  |  | 
|   |  | 
| ### on each 1st cluster node  |  | 
| cd /u01/patches/  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| ##mycmd## cd /u01/patches/bin  |  | 
| ##mycmd## ./precheck.sh -dbnodes=`/u01/app/19.0.0.0/grid/bin/olsnodes -n | awk '{print $1}'|xargs| sed -e 's/ /,/g'` -skip_cells -skip_database -skip_switches -skip_em -recheck_all  |  | 
| ##mycmd## ### find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*" -exec ls -rlt {} \+;  |  | 
| ##mycmd## ### egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$'   |  | 
| ##mycmd## egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$'  `find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*"  | xargs ls -altrt | tail -1| awk -F' ' '{print $9}'`  |  | 
|   |  | 
| ### on KVM Host  |  | 
| ##mycmd## for myNodes in `/opt/exadata_ovm/vm_maker --list | awk -F '(' {'print $1'}`; do ssh $myNodes egrep -v "INFO|PASS|SUCCESS|OUTPUT|^$"  `find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*"  | xargs ls -altrt | tail -1| awk -F' ' '{print $9}'` ; done  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list --vcpu --memory  |  | 
|   |  | 
| -----------------------------------------------------------------------------------------------------------------------------------------  |  | 
|   |  | 
| ### on each 1st cluster node  |  | 
| cd /u01/patches  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl disable crs  |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl stop crs -f  |  | 
| ##mycmd## sync  |  | 
| ##mycmd## shutdown -h now  |  | 
|   |  | 
| ### on KVM Host  |  | 
| cd /EXAVMIMAGES/patches  |  | 
| screen -c /EXAVMIMAGES/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| /opt/exadata_ovm/vm_maker --list --vcpu --memory  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --start-domain --all  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list --vcpu --memory  |  | 
| ##mycmd## ipmitool bmc reset cold  |  | 
| ##mycmd## reboot  |  | 
|   |  | 
| cd /EXAVMIMAGES/patches  |  | 
| screen -c /EXAVMIMAGES/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list-domains  |  | 
| df -hP  |  | 
| umount -a -t nfs4,smbfs,nfs,cifs -f -l  |  | 
| cp /etc/fstab /etc/fstab.origQDPE  |  | 
| grep -v nfs /etc/fstab > /etc/fstab.noNFS  |  | 
| unalias cp ; cp -f /etc/fstab.noNFS /etc/fstab  |  | 
| ##mycmd## df -hP  |  | 
|   |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --stop-domain --all  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list-domains  |  | 
| ##mycmd## cd /EXAVMIMAGES/patches/bin/dbnu  |  | 
| dcli -l root -g $HOME/dbs_group imageinfo -version  |  | 
| dcli -l root -g $HOME/dbs_group imageinfo -status  |  | 
| dcli -l root -g $HOME/dbs_group uname -r  |  | 
|   |  | 
| ##mycmd## ipmitool lan print  # adresse IP de l'ILOM  |  | 
|   |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /EXAVMIMAGES/patches/patches/p35667496_221000_Linux-x86-64.zip -b  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /EXAVMIMAGES/patches/patches/p35667496_221000_Linux-x86-64.zip -t 22.1.15.0.0.230901 -v -M  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /EXAVMIMAGES/patches/patches/p35667496_221000_Linux-x86-64.zip -t 22.1.15.0.0.230901 -n -q  |  | 
|   |  | 
|   |  | 
| 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 imageinfo -version  |  | 
| dcli -l root -g $HOME/dbs_group imageinfo -status  |  | 
| dcli -l root -g $HOME/dbs_group uname -r  |  | 
| ##mycmd## /opt/oracle.cellos/CheckHWnFWProfile  |  | 
| ##mycmd## cd /EXAVMIMAGES/patches/bin/dbnu  |  | 
| ##mycmd## ./dbnodeupdate.sh -t 22.1.15.0.0.230901 -c -q  |  | 
| ##mycmd## cp -f /etc/fstab.origQDPE /etc/fstab   |  | 
| ##mycmd## mount -a ; df -hP  |  | 
| ##mycmd## /opt/exadata_ovm/vm_maker --list --vcpu --memory  |  | 
|   |  | 
|   |  | 
| ### on each KVM Guests of patched KVM Host  |  | 
| cd /u01/patches  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
| dcli -l root -g $HOME/dbs_group imageinfo -version  |  | 
| dcli -l root -g $HOME/dbs_group imageinfo -status  |  | 
| dcli -l root -g $HOME/dbs_group uname -r  |  | 
| mount -a  |  | 
| rpm -qa | wc -l  |  | 
| #### if error, need to rebuild rpm database   |  | 
| 		ls -al /var/lib/rpm/__*  |  | 
| 		rm /var/lib/rpm/__*  |  | 
| 		rpm --rebuilddb  |  | 
| 		rpm -qa | wc -l  |  | 
| ##mycmd## df -hP  |  | 
|  cp /etc/fstab /etc/fstab.origQDPE  |  | 
| grep -v nfs /etc/fstab > /etc/fstab.noNFS  |  | 
| unalias cp && cp -f /etc/fstab.noNFS /etc/fstab  |  | 
| ##mycmd## umount -a -t nfs4,smbfs,nfs,cifs -f -l  |  | 
| ##mycmd## df -hP  |  | 
| if [[ $(ps -ef | grep diagsnap | grep -vc grep) -gt 0 ]]; then /u01/app/19.0.0.0/grid/bin/oclumon manage -disable diagsnap; fi  |  | 
|  inodes=$(df -i -P / | awk 'END {print $3}'); if [ $inodes -gt 500000 ] && [ $inodes  -le 1000000 ]; then echo -e "\nWARN... $inodes files\n"; elif [ $inodes -gt 1000000 ]; then echo -e "\nFAIL... $inodes files\n"; else echo -e "\nPASS... $inodes files\n"; fi  |  | 
| ##mycmd## cd /u01/patches/bin/dbnu/  |  | 
| ##mycmd## ./dbnodeupdate.sh -b -s  |  | 
| ##mycmd## ls -alh /u01/patches/patches/p*_22*_Linux-x86-64.zip  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /u01/patches/patches/p35667496_221000_Linux-x86-64.zip -t 22.1.15.0.0.230901 -v -M  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /u01/patches/patches/p35667496_221000_Linux-x86-64.zip -t 22.1.15.0.0.230901 -n -q  |  | 
|   |  | 
| # /dev/sda1 bug  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /u01/patches/patches/p35853251_2211500_Linux-x86-64.zip -t 22.1.15.0.0.231013 -v -M  |  | 
| ##mycmd## ./dbnodeupdate.sh -u -l /u01/patches/patches/p35853251_2211500_Linux-x86-64.zip -t 22.1.15.0.0.231013 -n -q  |  | 
|   |  | 
|   |  | 
| cd /u01/patches/  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| ##mycmd## cd /u01/patches/bin/dbnu/  |  | 
| ##mycmd## umount -a -t nfs4,smbfs,nfs,cifs -f -l  |  | 
| ##mycmd## ./dbnodeupdate.sh -t 22.1.15.0.0.230901 -c -q  |  | 
| ##mycmd## cp -f /etc/fstab.origQDPE /etc/fstab   |  | 
| ##mycmd## mount -a  |  | 
| ##mycmd## df -hP  |  | 
|     ##mycmd## yum list installed | grep fuse  |  | 
|     dcli -l root -g $HOME/dbs_group imageinfo -version  |  | 
|     dcli -l root -g $HOME/dbs_group imageinfo -status  |  | 
|     dcli -l root -g $HOME/dbs_group uname -r  |  | 
| ##mycmd## . oraenv  |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl enable crs  |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl check crs  |  | 
|   |  | 
|   |  | 
| if issues   |  | 
| cd /var/log/cellos/  |  | 
| cat dbnodeupdate.log  |  | 
| cat dbserver_backup.sh.log  |  | 
| cat CheckHWnFWProfile.log  |  | 
| cat exadata.computenode.post.log  |  | 
| cat cellFirstboot.log  |  | 
| cat exachkcfg.log  |  | 
| cat vldrun.each_boot.log  |  | 
| cat validations.log  |  | 
|   |  | 
| # Patching GI  |  | 
|   |  | 
| cd /u01/patches  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
| tfactl status  |  | 
| tfactl stop  |  | 
| ##mycmd## tfactl status  |  | 
|   |  | 
|   |  | 
| ### not to be used  |  | 
| mv /u01/app/19.0.0.0/grid/OPatch /u01/app/19.0.0.0/grid/OPatch.`date +%Y%m%d`  |  | 
| ls -dl /u01/app/19.0.0.0/grid/OP*  |  | 
| unzip -qo /mnt/patches/repository/p6880880_190000_Linux-x86-64.zip -d /u01/app/19.0.0.0/grid  |  | 
| chown -R grid:oinstall /u01/app/19.0.0.0/grid/OPatch  |  | 
| su - grid -c "/u01/app/19.0.0.0/grid/OPatch/opatch version -oh /u01/app/19.0.0.0/grid"  |  | 
| ###  |  | 
|   |  | 
| ##mycmd## cd /u01/patches/bin  |  | 
|   |  | 
| ./patch-homes.sh -h0 /u01/app/19.0.0.0/grid -h0b 35319490,35755646 -rolling --verify  |  | 
| ./patch-homes.sh -h0 /u01/app/19.0.0.0/grid -h0b 35319490,35755646 -rolling  |  | 
|   |  | 
|   |  | 
| ##mycmd## dcli -l root -g $HOME/dbs_group 'md5sum /u01/app/19.0.0.0/grid/bin/oracle'   |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl query crs activeversion -f  |  | 
| /u01/app/19.0.0.0/grid/bin/crsctl check crs  |  | 
|   |  | 
| for myNodes in `/opt/exadata_ovm/vm_maker --list | awk -F '(' {'print $1'}`; do ssh $myNodes /home/oracle/DBA/scripts/rac_status.sh ; done  |  | 
| </code>  |  | 
|   |  | 
| ===== 03_StorageNodesOS =====  |  | 
|   |  | 
| <code>  |  | 
| ### on KVM Host  |  | 
| cd /EXAVMIMAGES/patches  |  | 
| screen -c /EXAVMIMAGES/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|  cd /EXAVMIMAGES/patches/bin  |  | 
| ##mycmd## ./precheck.sh -skip_dbsrv -skip_switches -recheck_all  |  | 
| ##mycmd## egrep -v 'INFO|PASS|SUCCESS|^$'  `find /var/log/PlatinumPatching/PRECHECKS -name "precheck*.log" ! -name "*debug*"  | xargs ls -altrt | tail -1| awk -F' ' '{print $9}'`  |  | 
| ##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  |  | 
|   |  | 
| ### on each 1st cluster node  |  | 
|  cd /u01/patches  |  | 
|  screen -c /u01/patches/screenrc  |  | 
|  export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| ##mycmd## /u01/app/19.0.0.0/grid/bin/crsctl query crs activeversion -f  |  | 
| su - grid  |  | 
| export ORACLE_SID=+ASM1  |  | 
| export ORAENV_ASK=NO  |  | 
| . oraenv  |  | 
| sqlplus / as sysasm <<EOF  |  | 
| set echo on  |  | 
| select * from gv\$asm_operation;  |  | 
| show parameter ASM_POWER_LIMIT  |  | 
| alter system set ASM_POWER_LIMIT = 256 scope=both;  |  | 
| show parameter ASM_POWER_LIMIT  |  | 
| column dg format a15  |  | 
| column attribute format a30  |  | 
| column value format a15  |  | 
| select dg.name dg,a.name attribute,a.value from v\$asm_diskgroup dg, v\$asm_attribute a where dg.group_number=a.group_number and a.name='failgroup_repair_time' order by dg;  |  | 
| column dg format a15  |  | 
| column attribute format a30  |  | 
| column value format a15  |  | 
| select dg.name dg,a.name attribute,a.value from v\$asm_diskgroup dg, v\$asm_attribute a where dg.group_number=a.group_number and a.name='disk_repair_time' order by dg;  |  | 
| column dg format a15  |  | 
| column attribute format a30  |  | 
| column value format a15  |  | 
| select dg.name dg,a.name attribute,a.value from v\$asm_diskgroup dg, v\$asm_attribute a where dg.group_number=a.group_number and a.name='compatible.asm' order by dg;  |  | 
| exit  |  | 
| EOF  |  | 
| exit  |  | 
|   |  | 
| ### ON KVM Host  |  | 
|   |  | 
| ##mycmd## cd /EXAVMIMAGES/patches/tmp/patch_22.1.15.0.0.230901  |  | 
| ##mycmd## ./patchmgr -cells $HOME/cell_group.9_10 -reset_force  |  | 
| ##mycmd## ./patchmgr -cells $HOME/cell_group.9_10 -cleanup  |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group.9_10 ipmitool bmc reset cold  |  | 
|   |  | 
| ####    |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group.9_10 'mount -av'  |  | 
|   |  | 
|   |  | 
| ##mycmd## ./patchmgr -cells $HOME/cell_group.9_10 -patch_check_prereq -rolling  |  | 
| ##mycmd## #### egrep -v 'INFO|PASS|SUCCESS|OUTPUT|^$' patchmgr.stdout ????  |  | 
| ##mycmd## nohup ./patchmgr -cells $HOME/cell_group.9_10 -patch -rolling &   |  | 
|   |  | 
| ##mycmd## egrep 'Execute plugin check for Patching|state success Expected|Execute plugin check for Pre Disk Activation|Execute plugin check for Post Patch|Finalize patch and check final status on cells' patchmgr.stdout  |  | 
|   |  | 
|   |  | 
| su - grid  |  | 
| export ORACLE_SID=+ASM1  |  | 
| export ORAENV_ASK=NO  |  | 
| . oraenv  |  | 
| sqlplus / as sysasm <<EOF  |  | 
| set echo on lines 300 pages 5000  |  | 
| select * from gv\$asm_operation;  |  | 
| exit  |  | 
| EOF  |  | 
| exit  |  | 
|   |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group.9_10 imageinfo -version  |  | 
| ##mycmd## dcli -l root -g $HOME/cell_group.5_6 'cellcli -e list griddisk attributes name,status,asmmodestatus,asmdeactivationoutcome'  |  | 
| ##mycmd## dcli -l root -g $HOME/guests_group "egrep -B 1 'rebalance of group|rebalance completed|asm_power_limit' /u01/app/grid/diag/asm/+asm/+ASM*/trace/alert_+ASM*.log"  |  | 
|   |  | 
| ##mycmd## ./patchmgr -cells $HOME/cell_group.9_10 -cleanup  |  | 
|   |  | 
|   |  | 
| ### On KVM host (after all cells upgrade)  |  | 
| ##mycmd## ./precheck.sh -skip_dbsrv -skip_switches -recheck_all  |  | 
| </code>  |  | 
|   |  | 
| ===== 04_Interconnect.txt =====  |  | 
|   |  | 
| <code>  |  | 
| cd /u01/patches  |  | 
| screen -c /u01/patches/screenrc  |  | 
| export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
|   |  | 
| ##mycmd## mkdir -p /u01/patches/ROCE/install/  |  | 
| ##mycmd## unzip -qo /mnt/patches/repository/p35468771_221000_Linux-x86-64.zip -d /u01/patches/ROCE/install/  |  | 
| ##mycmd## chown -R oracle:oinstall /u01/patches/ROCE  |  | 
| ##mycmd## ls -al /u01/patches/ROCE/install/  |  | 
|   |  | 
| ##mycmd## grep roce /EXAVMIMAGES/onecommand/linux-x64/WorkDir/databasemachine.xml  |  | 
|   |  | 
| ##mycmd## cd /u01/patches/ROCE/install/patch_switch_22.1.13.0.0.230712  |  | 
|   |  | 
| ##mycmd## vi roceswitches.lst   |  | 
|   |  | 
| ##mycmd## ./ibdiagtools/setup_switch_ssh_equiv.sh pc2yy559-rocea.pcy.edf.fr,pc2yy559-roceb.pcy.edf.fr  |  | 
|   |  | 
| ##mycmd## export PS1='\[\e[1;31m\][\u@\h (\t) \w]\$\[\e[0m\] '  |  | 
| ##mycmd## cd /u01/patches/ROCE/install/patch_switch_22.1.13.0.0.230712  |  | 
|   |  | 
| ##mycmd## ./patchmgr --roceswitches /u01/patches/ROCE/install/roceswitches.lst --verify-config --log_dir /u01/patches/ROCE/install/scratchpad/  |  | 
| ##mycmd## ./patchmgr --roceswitches /u01/patches/ROCE/install/roceswitches.lst --upgrade --roceswitch-precheck --log_dir /u01/patches/ROCE/install/scratchpad/  |  | 
| ##mycmd## ./patchmgr --roceswitches /u01/patches/ROCE/install/roceswitches.lst --upgrade --log_dir /u01/patches/ROCE/install/scratchpad/  |  | 
|   |  | 
| pc2yy559-rocea.pcy.edf.fr:sfleaf  |  | 
| pc2yy559-roceb.pcy.edf.fr:sfleaf  |  | 
| </code> |  |