2.11.7 Recovering Exadata X6 or Earlier Database Servers with Customized Partitions

This procedure describes how to recover Oracle Exadata Database Servers for Oracle Exadata X6-2 or earlier running Oracle Linux from a snapshot-based backup when using customized partitions.

  1. Prepare an NFS server to host the backup archive file (mybackup.tar.bz2).

    The NFS server must be accessible by IP address.

    For example, on an NFS server with the IP address nfs_ip, where the directory /export is exported as an NFS mount, put the backup file (mybackup.tar.bz2) in the /export directory.

  2. Restart the recovery target system using the diagnostics.iso file.
    See Booting a Server using the Diagnostic ISO File in Oracle Exadata System Software User's Guide.
  3. Log in to the diagnostics shell as the root user.
    When prompted, enter the diagnostics shell.

    For example:

    Choose from following by typing letter in '()':
    (e)nter interactive diagnostics shell. Must use credentials 
    from Oracle support to login (reboot or power cycle to exit
    the shell),
    (r)estore system from NFS backup archive, 
    Type e to enter the diagnostics shell and log in as the root user.
    If prompted, log in to the system as the root user. If you are prompted for the root user password and do not have it, then contact Oracle Support Services.
  4. If required, use /opt/MegaRAID/storcli/storcli64 (or /opt/MegaRAID/MegaCli/MegaCli64 for releases earlier than Oracle Exadata System Software 19c) to configure the disk controller to set up the disks.
  5. Unmount /mnt/cell
    # umount /mnt/cell
  6. Create the boot partition.
    1. Start an interactive session using the partd command.
      # parted /dev/sda
    2. Assign a disk label.
      • If you are running Oracle Exadata System Software release 11.2.3.3.0 or later:

        (parted) mklabel gpt
      • If you are running a release earlier than Oracle Exadata System Software release 11.2.3.3.0:

        (parted) mklabel msdos
    3. Set the unit size as sector.
      (parted) unit s
    4. Check the partition table by displaying the existing partitions.
      (parted) print
    5. Remove the partitions that will be re-created.
      (parted) rm <part#>
    6. Create a new first partition.
      (parted) mkpart primary 63 1048639
    7. Specify this is a bootable partition.
      (parted) set 1 boot on
  7. Create an additional primary (LVM) partition.
    • If using Oracle Exadata System Software release 18.1.0.0.0 or later — Create second primary (bios_grub) and third primary (LVM) partitions:
      1. Create a new second partition.

        (parted) mkpart primary 1048640 1050687
      2. Specify this is a GRUB BIOS partition.

        (parted) set 2 bios_grub on
      3. Create a new third partition.

        (parted) mkpart primary 1050688 1751949278
      4. Specify this is a physical volume.

        (parted) set 3 lvm on
      5. Write the information to disk, then quit.

        (parted) quit
    • If using a release earlier than Oracle Exadata System Software release 18.1.0.0.0:
      1. Create a new second partition.

        (parted) mkpart primary 1048640 -1
      2. Specify this is a physical volume.

        (parted) set 2 lvm on
      3. Write the information to disk, then quit.

        (parted) quit
  8. Re-create the customized LVM partitions and create the file systems.
    1. Create the physical volume, volume group, and the logical volumes as follows:
      # lvm pvcreate /dev/sda2
      # lvm vgcreate VGExaDb /dev/sda2
    2. Create the logical volume for the / (root) directory, a file system, and label it.
      • Create the logical volume:

        # lvm lvcreate -n LVDbSys1 -L40G VGExaDb
      • If using Oracle Exadata System Software release 12.1.2.2.0 or later, then create the logical volume for the reserved partition.

        # lvm lvcreate -n LVDoNotRemoveOrUse –L1G VGExaDb

        Note:

        Do not create any file system on this logical volume.
      • Create the file system.

        • If you previously had an ext4 file system, use the mkfs.ext4 command:

          # mkfs.ext4 /dev/VGExaDb/LVDbSys1
        • If you previously had an ext3 file system, use the mkfs.ext3 command:

          # mkfs.ext3 /dev/VGExaDb/LVDbSys1
      • Label the file system.

        # e2label /dev/VGExaDb/LVDbSys1 DBSYS
    3. Create the system swap space.
      # lvm lvcreate -n LVDbSwap1 -L24G VGExaDb
      # mkswap -L SWAP /dev/VGExaDb/LVDbSwap1
    4. Create the logical volume for the /u01 directory, and label it.
      • Create the logical volume:

        # lvm lvcreate -n LVDbOra1 -L100G VGExaDb
      • Create the file system.

        • If you previously had an ext4 file system, then use the mkfs.ext4 command:

          # mkfs.ext4 /dev/VGExaDb/LVDbOra1
        • If you previously had an ext3 file system, then use the mkfs.ext3 command:

          # mkfs.ext3 /dev/VGExaDb/LVDbOra1
      • Label the file system.

        # e2label /dev/VGExaDb/LVDbOra1 DBORA
    5. Create a file system on the /boot partition, and label it.
      • Create the file system.

        • If you previously had an ext4 file system, use the mkfs.ext4 command:

          # mkfs.ext4 /dev/sda1
        • If you previously had an ext3 file system, use the mkfs.ext3 command:

          # mkfs.ext3 /dev/sda1
      • Label the file system:

        # e2label /dev/sda1 BOOT

      Note:

      For customized file system layouts, additional logical volumes can be created at this time. For customized layouts, different sizes may be used.
  9. Create mount points for all the partitions to mirror the original system, and mount the respective partitions.

    For example, assuming /mnt is used as the top level directory for this, the mounted list of partitions may look like the following:

    /dev/VGExaDb/LVDbSys1 on /mnt
    /dev/VGExaDb/LVDbOra1 on /mnt/u01
    /dev/sda1 on /mnt/boot

    Note:

    For customized file system layouts with additional logical volumes, additional mount points need to be created during this step.

    The following is an example for Oracle Exadata X6-2 and earlier systems of how to mount the root file system, and create two mount points. In the commands below, filesystem_type specifies the applicable file system type; either ext3 or ext4.

    # mount /dev/VGExaDb/LVDbSys1 /mnt -t filesystem_type
    # mkdir /mnt/u01 /mnt/boot
    # mount /dev/VGExaDb/LVDbOra1 /mnt/u01 -t filesystem_type
    # mount /dev/sda1 /mnt/boot -t filesystem_type
  10. Bring up the network.
    • If the operating system is Oracle Linux 6 or later:
      # ip address add ip_address_for_eth0/netmask_for_eth0 dev eth0
      # ip link set up eth0
      # ip route add default via gateway_address dev eth0
    • If the operating system is Oracle Linux 5:
      # ifconfig eth0 ip_address_for_eth0 netmask netmask_for_eth0 up
  11. Mount the NFS server where you have the backup.

    The following example assumes that the backup is located in the /export directory of the NFS server with IP address nfs_ip.

    # mkdir -p /root/mnt
    # mount -t nfs -o ro,intr,soft,proto=tcp,nolock nfs_ip:/export /root/mnt
  12. Restore from backup.
    # tar -pjxvf /root/mnt/mybackup.tar.bz2 -C /mnt
  13. Unmount the restored file systems, and remount the /boot partition.
    # umount /mnt/u01
    # umount /mnt/boot
    # umount /mnt
    # mkdir /boot
    # mount /dev/sda1 /boot -t filesystem_type
  14. Set up the boot loader.

    In the following instructions, /dev/sda1 is the /boot area.

    • If using Oracle Exadata System Software release 18.1.0.0.0 or later:
      # grub2-install /dev/sda
      
      Installing for i386-pc platform.
      Installation finished. No error reported.
    • If using a release earlier than Oracle Exadata System Software release 18.1.0.0.0:
      # grub
      grub> find /I_am_hd_boot
      grub> root (hdX,0)
      grub> setup (hdX)
      grub> quit

      In the preceding commands, the find command identifies the hard disk that contains the file I_am_hd_boot; for example (hd0,0). Use the value that you observe to specify the hdX value in the GRUB root and setup commands.

  15. Detach the diagnostics.iso file.
  16. Unmount the /boot partition.
    # umount /boot
  17. Restart the system.
    # shutdown -r now

    This completes the restoration procedure for the server.

  18. If the recovery was on Oracle Exadata Eighth Rack, then perform the procedure described in Configuring Oracle Exadata Database Machine Eighth Rack Oracle Linux Database Server After Recovery.