December 22, 2015

Exadata Pre-upgrade: Backing up /, /boot & /u01 mount point

During any Exadata patching and/or Grid Infrastructure/Oracle Database upgrade we always want to keep a backup of the OS & Oracle Binaries before start changing anything in the environment.

Backup of / (root) & /boot mount point can be done using DBNU utility (MOS Note # 1553103.1).
For /u01, it is possible to follow the below procedure to backup.

Note: These backups (below procedure and/or DBNU) are meant to take backup within the same environment (same LVM) which is just for faster recovery and/or references in case something goes wrong during the maintenance. It's not meant for disaster recovery. For disaster recovery, it is highly recommended to follow the procedure mentioned in the Exadata Documentation: Recovering Oracle Linux Database Server Using a Snapshot-Based Backup.

The purpose of this is to have a backup copy of the contents of /u01 before doing any upgrade (e.g. 12c) or patching GI/DB.
 Step 1: Create the Backup LV manually for /u01  
 # lvcreate -L 100G -n /dev/VGExaDb/LVDbOra2  
 # mkfs.ext(3/4) /dev/VGExaDb/LVDbOra2  
 Step 2: Create a snapshot named u01_snap for the /u01 mount point  
 # lvcreate -L5G -s -n u01_snap /dev/VGExaDb/LVDbOra1  
 Step 3: Label the snapshot  
 # e2label /dev/VGExaDb/u01_snap DBORA_SNAP  
 Step 4: Create the required directories  
 # mkdir -p /root/mnt/u01.SNAP  
 # mkdir -p /root/mnt/u01.BACKUP  
 Step 5: Mount the snapshot & the inactive /u01 partition  
 # mount /dev/VGExaDb/u01_snap /root/mnt/u01.SNAP -t ext(3/4)  
 # mount /dev/VGExaDb/LVDbOra2 /root/mnt/u01.BACKUP -t ext(3/4)  
 Step 6: Take a filesystem backup from the snapshot to the LVDbOra2 LV.
 # cd /root/mnt/u01.SNAP  
 # tar -Spcv * | tar -px -C /root/mnt/u01.BACKUP  
 Step 7: Unmount  
 # umount /root/mnt/u01.SNAP  
 # umount /root/mnt/u01.BACKUP  
 Step 8: Remove the snapshots for the /u01  
 # lvremove /dev/VGExaDb/u01_snap  

Rollback (in summary)
-- Rollback / (root) and /boot mount point using: # ./dbnodeupdate.sh -r
-- Unmount the existing /u01 and mount the backup LV (LVDbOra2) as /u01

2 comments:

  1. whoah this blog is magnificent i love studying your articles.
    Stay up the good work! You understand, a lott of persons are hunting round for this info,
    you could aid them greatly.

    ReplyDelete
  2. This page certainly has all the information and facts I wanted
    about this subject and didn't know who to ask.

    ReplyDelete