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.- 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. - 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. - 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 theroot
user. If you are prompted for theroot
user password and do not have it, then contact Oracle Support Services. - 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. - If it is mounted, unmount
/mnt/cell
# umount /mnt/cell
- Create the boot partition.
- Start an interactive session using the
partd
command.# parted /dev/sda
- Assign a disk label.
(parted) mklabel gpt
- Set the unit size as sector.
(parted) unit s
- Check the partition table by displaying the existing partitions.
(parted) print
- Remove the partitions listed in the previous step.
(parted) rm part#
- Create a new first partition.
(parted) mkpart primary 64s 1048639s
- Specify this is a bootable partition.
(parted) set 1 boot on
- Start an interactive session using the
- Create second primary (boot) and third primary (LVM) partitions.
- Create a second primary partition as a UEFI boot partition with
fat32
.(parted) mkpart primary fat32 1048640s 1572927s (parted) set 2 boot on
- Create a new third partition.
(parted) mkpart primary 1572928s –1s
- Configure the third partition as a physical volume.
(parted) set 3 lvm on
- Write the information to disk, then quit.
(parted) quit
- Create a second primary partition as a UEFI boot partition with
- 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
- 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.- 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
- 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
-
- 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
-
- 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
orext4
as the filesystem_type according to your system configuration.
- Create the logical volumes.
- 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
- Create
/mnt/boot/efi
, label/dev/sda2
, and mount/dev/sda2
on/mnt/boot/efi
with typevfat
.# mkdir /mnt/boot/efi # dosfslabel /dev/sda2 ESP # mount /dev/sda2 /mnt/boot/efi -t vfat
- 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
- 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 - Restore from backup.
# tar -pjxvf /root/mnt/mybackup.tar.bz2 -C /mnt
- 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
- Detach the
diagnostics.iso
file. - Check the boot devices and boot order for the
ExadataLinux_1
device.- 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
- 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
- Check the available boot devices.
- 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.- Press F2 when booting the system.
- Go to the Setup Utility.
- Select BOOT.
- Set
ExadataLinux_1
for Boot Option #1. - Exit the Setup Utility.
- Run
reclaimdisks.sh
on restored database server.# /opt/oracle.SupportTools/reclaimdisks.sh -free -reclaim
- 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.