2.11.6 Recovering Exadata Database Servers X7 or X8 with Customized Partitions

This procedure describes how to recover an Oracle Exadata X7 or X8 Oracle Linux database server with InfiniBand Network Fabric from a snapshot-based backup when using customized partitions.

Note:

This task assumes you are running Oracle Exadata System Software release 18c (18.1.0) or greater.
  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. If it is mounted, 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.
      (parted) mklabel gpt
    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 listed in the previous step.
      (parted) rm part#
    6. Create a new first partition.
      (parted) mkpart primary 64s 1048639s
    7. Specify this is a bootable partition.
      (parted) set 1 boot on
  7. Create second primary (boot) and third primary (LVM) partitions.
    1. Create a second primary partition as a UEFI boot partition with fat32.
      (parted) mkpart primary fat32 1048640s 1572927s 
      (parted) set 2 boot on
    2. Create a new third partition.
      (parted) mkpart primary 1572928s –1s
    3. Configure the third partition as a physical volume.
      (parted) set 3 lvm on
    4. Write the information to disk, then quit.
      (parted) quit
  8. Create the physical volume and volume group.
    # lvm pvcreate /dev/sda3
    # lvm vgcreate VGExaDb /dev/sda3

    If the physical volume or volume group already exists, then remove and then re-create them as follows:.

    # lvm vgremove VGExaDb
    # lvm pvremove /dev/sda3
    # lvm pvcreate /dev/sda3
    # lvm vgcreate VGExaDb /dev/sda3
  9. Re-create the customized LVM partitions, then create and mount the file systems.

    Note:

    Use the following information and examples as guidance for this step. You must make the necessary adjustments for customized LVM partitions and file systems. For example, you may need to adjust the names and sizes of various partitions to match your previous customizations, or you may need to create additional custom partitions.
    1. Create the logical volumes.

      For example, to create logical volumes for the / (root) and /u01 file systems:

      # lvm lvcreate -n LVDbSys1 -L40G VGExaDb
      # lvm lvcreate -n LVDbOra1 -L100G VGExaDb
    2. Create the file systems.
      • If your environment uses the xfs file system type, then you could use the following commands to create the / (root), /u01, and /boot file systems:

        # mkfs.xfs /dev/VGExaDb/LVDbSys1 -f
        # mkfs.xfs /dev/VGExaDb/LVDbOra1 -f
        # mkfs.xfs /dev/sda1 -f
      • Alternatively, if your environment uses the ext4 file system type, then you could use the following commands:

        # mkfs.ext4 /dev/VGExaDb/LVDbSys1
        # mkfs.ext4 /dev/VGExaDb/LVDbOra1
        # mkfs.ext4 /dev/sda1
    3. Label the file systems.
      • If your environment uses the xfs file system type, then you could use the following commands to label the / (root), /u01, and /boot file systems:

        # xfs_admin -L DBSYS /dev/VGExaDb/LVDbSys1
        # xfs_admin -L DBORA /dev/VGExaDb/LVDbOra1
        # xfs_admin -L BOOT /dev/sda1
      • Alternatively, if your environment uses the ext4 file system type, then you could use the following commands:

        # e2label /dev/VGExaDb/LVDbSys1 DBSYS
        # e2label /dev/VGExaDb/LVDbOra1 DBORA
        # e2label /dev/sda1 BOOT
    4. Create mount points for all the partitions to mirror the original system, and mount the respective partitions.

      For example, assuming that /mnt is used as the top level directory for the recovery operation, you could use the following commands to create the directories and mount the partitions:

      # mkdir -p /mnt/u01
      # mkdir -p /mnt/boot
      # mount /dev/VGExaDb/LVDbSys1 /mnt -t filesystem_type
      # mount /dev/VGExaDb/LVDbOra1 /mnt/u01 -t filesystem_type
      # mount /dev/sda1 /mnt/boot -t filesystem_type

      In the preceding commands, specify xfs or ext4 as the filesystem_type according to your system configuration.

  10. Create the system swap space.
    For Oracle Exadata X7 and X8 systems, the default swap size is 24 GB.

    For example:

    # lvm lvcreate -n LVDbSwap1 -L24G VGExaDb
    # mkswap -L SWAP /dev/VGExaDb/LVDbSwap1
    
  11. Create /mnt/boot/efi, label /dev/sda2, and mount /dev/sda2 on /mnt/boot/efi with type vfat.
    # mkdir /mnt/boot/efi
    # dosfslabel /dev/sda2 ESP
    # mount /dev/sda2 /mnt/boot/efi -t vfat
  12. Bring up the network.
    # 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
  13. 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
  14. Restore from backup.
    # tar -pjxvf /root/mnt/mybackup.tar.bz2 -C /mnt
  15. Unmount the restored file systems.

    For example:

    # umount /mnt/boot/efi
    # umount /mnt/boot
    # umount /mnt/tmp
    # umount /mnt/var/log/audit
    # umount /mnt/var/log
    # umount /mnt/var
    # umount /mnt/home
    # umount /mnt/u01
    # umount /mnt
  16. Detach the diagnostics.iso file.
  17. Check the boot devices and boot order for the ExadataLinux_1 device.
    1. Check the available boot devices.
      # efibootmgr
      BootCurrent: 000C
      Timeout: 1 seconds
      BootOrder: 000C,0001,0002,0003,0004,0005,0007,0008,0009,000A,000B
      Boot0001* NET0:PXE IP4 Intel(R) I210 Gigabit  Network Connection
      Boot0002* NET1:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0003* NET2:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0004* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0005* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0007* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0008* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0009* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000A* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000B* Oracle Linux
      Boot000C* USB:SUN

      If the Boot0000* ExadataLinux_1 device is not listed then create the device.

      # efibootmgr -c -d /dev/sda -p 2 -l '\EFI\REDHAT\SHIM.EFI' -L 'ExadataLinux_1'
      BootCurrent: 000C
      Timeout: 1 seconds
      BootOrder: 0000,000C,0001,0002,0003,0004,0005,0007,0008,0009,000A,000B
      Boot0001* NET0:PXE IP4 Intel(R) I210 Gigabit  Network Connection
      Boot0002* NET1:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0003* NET2:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0004* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0005* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0007* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0008* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0009* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000A* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000B* Oracle Linux
      Boot000C* USB:SUN
      Boot0000* ExadataLinux_1
    2. Configure the Boot0000* ExadataLinux_1 device to be first in the boot order.
      # efibootmgr -o 0000
      BootCurrent: 000B
      Timeout: 1 seconds
      BootOrder: 0000
      Boot0000* ExadataLinux_1
      Boot0001* NET0:PXE IP4 Intel(R) I210 Gigabit  Network Connection
      Boot0002* NET1:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0003* NET2:PXE IP4 Oracle Dual Port 10GBase-T Ethernet Controller
      Boot0004* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0005* PCIE1:PXE IP4 Oracle Dual Port 25Gb Ethernet Adapter
      Boot0007* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0008* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot0009* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000A* PCIE3:PXE IP4 Oracle Quad Port 10GBase-T Adapter
      Boot000B* USB:SUN
      Boot000C* UEFI OS
  18. Restart the system and update the boot order in the BIOS.
    # reboot

    Modify the boot order to set the ExadataLinux_1 boot device as the first device.

    1. Press F2 when booting the system.
    2. Go to the Setup Utility.
    3. Select BOOT.
    4. Set ExadataLinux_1 for Boot Option #1.
    5. Exit the Setup Utility.
  19. Run reclaimdisks.sh on restored database server.
    # /opt/oracle.SupportTools/reclaimdisks.sh -free -reclaim
  20. If the recovery was on Oracle Exadata Database Machine Eighth Rack, then perform the procedure described in Configuring Oracle Exadata Database Machine Eighth Rack Oracle Linux Database Server After Recovery.