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.
- 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. - 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.
-
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
-
- Set the unit size as sector.
(parted) unit s
- Check the partition table by displaying the existing partitions.
(parted) print
- Remove the partitions that will be re-created.
(parted) rm <part#>
- Create a new first partition.
(parted) mkpart primary 63 1048639
- Specify this is a bootable partition.
(parted) set 1 boot on
- Start an interactive session using the
- 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:
-
Create a new second partition.
(parted) mkpart primary 1048640 1050687
-
Specify this is a GRUB BIOS partition.
(parted) set 2 bios_grub on
-
Create a new third partition.
(parted) mkpart primary 1050688 1751949278
-
Specify this is a physical volume.
(parted) set 3 lvm on
-
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:
-
Create a new second partition.
(parted) mkpart primary 1048640 -1
-
Specify this is a physical volume.
(parted) set 2 lvm on
-
Write the information to disk, then quit.
(parted) quit
-
- If using Oracle Exadata System Software release 18.1.0.0.0 or later — Create second primary (bios_grub) and third primary (LVM) partitions:
- Re-create the customized LVM partitions and create the file systems.
- Create the physical volume, volume group, and the logical volumes as
follows:
# lvm pvcreate /dev/sda2 # lvm vgcreate VGExaDb /dev/sda2
- 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 themkfs.ext4
command:# mkfs.ext4 /dev/VGExaDb/LVDbSys1
-
If you previously had an
ext3
file system, use themkfs.ext3
command:# mkfs.ext3 /dev/VGExaDb/LVDbSys1
-
-
Label the file system.
# e2label /dev/VGExaDb/LVDbSys1 DBSYS
-
- Create the system swap space.
# lvm lvcreate -n LVDbSwap1 -L24G VGExaDb # mkswap -L SWAP /dev/VGExaDb/LVDbSwap1
- 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 themkfs.ext4
command:# mkfs.ext4 /dev/VGExaDb/LVDbOra1
-
If you previously had an
ext3
file system, then use themkfs.ext3
command:# mkfs.ext3 /dev/VGExaDb/LVDbOra1
-
-
Label the file system.
# e2label /dev/VGExaDb/LVDbOra1 DBORA
-
- Create a file system on the
/boot
partition, and label it.-
Create the file system.
-
If you previously had an
ext4
file system, use themkfs.ext4
command:# mkfs.ext4 /dev/sda1
-
If you previously had an
ext3
file system, use themkfs.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. -
- Create the physical volume, volume group, and the logical volumes as
follows:
- 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; eitherext3
orext4
.# 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
- 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
- If the operating system is Oracle Linux 6 or
later:
- 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, and remount the
/boot
partition.# umount /mnt/u01 # umount /mnt/boot # umount /mnt # mkdir /boot # mount /dev/sda1 /boot -t filesystem_type
- 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 fileI_am_hd_boot
; for example(hd0,0)
. Use the value that you observe to specify the hdX value in the GRUBroot
andsetup
commands.
- If using Oracle Exadata System Software release
18.1.0.0.0 or
later:
- Detach the
diagnostics.iso
file. - Unmount the
/boot
partition.# umount /boot
- Restart the system.
# shutdown -r now
This completes the restoration procedure for the server.
- 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.