During all my ODA projects where I need to perform patching operation, I’m using odabr tool. This tool is really easy to use and well designed. It offers the possibility to create snapshot on the /, /u01 and /opt LVM file systems as well as a physical copy (rsync) of the files to an external destination storage as NFS. This is powerful in case you would like to get just one file back. The tool, as well as the user guide, can be found on Oracle Doc ID 2466177.1. I recently faced some errors when the tool is performing EFI device backup, and thus resulting in failing without been able to create any snapshot. I wanted to share my finding here, and maybe for you to win some troubleshooting time.

How to install the tool?

Easy to install. You just need to download from the Doc ID the odabr-2.0.1-66.noarch.rpm package.

Check that the package is not already installed:

[root@ODA01 patch]# rpm -qa | grep -i odabr
[root@ODA01 patch]#

Install the tool:
[root@ODA01 patch]# ls -ltrh
total 5.2G
-rwxrwxrwx 1 root root 5.2G Jul 19 15:00 p30403673_1911000_Linux-x86-64.zip
-rw-r--r-- 1 root root 27K Jul 21 09:00 odabr-2.0.1-66.noarch.rpm
 
[root@ODA01 patch]# rpm -ivh odabr-2.0.1-66.noarch.rpm
warning: odabr-2.0.1-66.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 939112d6: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:odabr-2.0.1-66 ################################# [100%]
 
odabr-2.0.1.66 has been installed on /opt/odabr succesfully!
 
[root@ODA01 patch]# rpm -qa | grep -i odabr
odabr-2.0.1-66.noarch

Making a snapshot backup

First we will need to check if we have enough place in the physical volume.

[root@ODA01 patch]# pvdisplay
--- Physical volume ---
PV Name /dev/md126p3
VG Name VolGroupSys
PV Size <446.15 GiB / not usable 23.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 14276
Free PE 5444
Allocated PE 8832
PV UUID VyihMy-xEoI-SgKi-Apku-PBIS-BTnf-v2tsfU

In our case we have 5444 Free PE, one PE has a size of 32 MiB, thus making here about 170 GB available for snapshots.

By default the tool is assigning 190 GB snapshot to the 3 file systems (/, /u01 and /opt). If we have enough free space, we could simply run the following command to create snapshots backup:
[root@ODA01 patch]# /opt/odabr/odabr backup -snap

In our case knowing we only have 170 GB free, we might need to adjust the snapshots size.

With a df command we will first check how many place is needed :
[root@ODA01 patch]# df -h / /u01 /opt
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroupSys-LogVolRoot 30G 7.1G 21G 26% /
/dev/mapper/VolGroupSys-LogVolU01 118G 77G 36G 69% /u01
/dev/mapper/VolGroupSys-LogVolOpt 99G 53G 41G 57% /opt

From there we will size each snapshot size (rsize for /, usize for /u01 and osize for /opt) :
[root@ODA01 patch]# /opt/odabr/odabr backup -snap -rsize 15 -usize 90 -osize 60

EFI device backup issue

Running it could fail with EFI device backup issue:
[root@ODA01 patch]# /opt/odabr/odabr backup -snap -rsize 15 -usize 90 -osize 60
INFO: 2021-07-21 09:08:08: Please check the logfile '/opt/odabr/out/log/odabr_84675.log' for more details
 
 
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
odabr - ODA node Backup Restore - Version: 2.0.1-66
Copyright Oracle, Inc. 2013, 2021
--------------------------------------------------------
Author: Ruggero Citton
RAC Pack, Cloud Innovation and Solution Engineering Team
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
 
INFO: 2021-07-21 09:08:08: Checking superuser
INFO: 2021-07-21 09:08:08: Checking Bare Metal
 
INFO: 2021-07-21 09:08:08: Removing existing LVM snapshots
WARNING: 2021-07-21 09:08:08: LVM snapshot for 'opt' does not exist
WARNING: 2021-07-21 09:08:08: LVM snapshot for 'u01' does not exist
WARNING: 2021-07-21 09:08:08: LVM snapshot for 'root' does not exist
 
INFO: 2021-07-21 09:08:08: Checking current OS version
INFO: 2021-07-21 09:08:08: Checking LVM restore backgroud process
INFO: 2021-07-21 09:08:08: Checking LVM size
 
INFO: 2021-07-21 09:08:08: Boot device backup
INFO: 2021-07-21 09:08:08: Getting EFI device
INFO: 2021-07-21 09:08:08: ...step1 - unmounting EFI
INFO: 2021-07-21 09:08:08: ...step2 - making efi device backup
SUCCESS: 2021-07-21 09:08:10: ...EFI device backup saved as '/opt/odabr/out/hbi/efi.img'
INFO: 2021-07-21 09:08:10: ...step3 - checking EFI device backup
ERROR: 2021-07-21 09:08:10: Error running fsck over /opt/odabr/out/hbi/efi.img
ERROR: 2021-07-21 09:08:10: Command: 'fsck -a /opt/odabr/out/hbi/efi.img' failed as fsck from util-linux 2.23.2 fsck.fat 3.0.20 (12 Jun 2013) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /opt/odabr/out/hbi/efi.img: 20 files, 1100/63965 clusters
INFO: 2021-07-21 09:08:10: Mounting EFI back
ERROR: 2021-07-21 09:08:10: Backup not completed, exiting...

See the error :
ERROR: 2021-07-21 09:08:10: Error running fsck over /opt/odabr/out/hbi/efi.img
ERROR: 2021-07-21 09:08:10: Command: 'fsck -a /opt/odabr/out/hbi/efi.img' failed as fsck from util-linux 2.23.2 fsck.fat 3.0.20 (12 Jun 2013) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. Automatically removing dirty bit. Performing changes. /opt/odabr/out/hbi/efi.img: 20 files, 1100/63965 clusters

This mainly means that the the image being checked was not properly unmounted and contains dirty bits. This is explained as well in Doc ID 2679511.1.

Solution

In order to resolve this issue, simply run fsck on the /boot/efi partition before running the tool.

First check which partition the /boot/efi is mounted on :

[root@ODA01 ~]# lsblk | grep efi
└─sda1 8:1 0 500M 0 part /boot/efi

Then umount the /boot/efi partition :

[root@ODA01 ~]# umount /boot/efi

Run fsck on the /boot/efi partition :

[root@ODA01 ~]# fsck.vfat -a /dev/sda1
fsck.fat 3.0.20 (12 Jun 2013)
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Performing changes.
/dev/sda1: 20 files, 1100/63965 clusters

Mount the /boot/efi partition again :

[root@ODA01 ~]# mount /boot/efi

Check that the /boot/efi file system is well mounted again :

[root@ODA01 ~]# df -h /boot/efi
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 500M 8.6M 492M 2% /boot/efi

And then running odabr tool again will make the snapshots creation now successful:

[root@ODA01 hbi]# /opt/odabr/odabr backup -snap -rsize 15 -usize 90 -osize 60
INFO: 2021-09-04 18:26:25: Please check the logfile '/opt/odabr/out/log/odabr_38651.log' for more details
 
 
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
odabr - ODA node Backup Restore - Version: 2.0.1-66
Copyright Oracle, Inc. 2013, 2021
--------------------------------------------------------
Author: Ruggero Citton
RAC Pack, Cloud Innovation and Solution Engineering Team
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
 
INFO: 2021-09-04 18:26:25: Checking superuser
INFO: 2021-09-04 18:26:25: Checking Bare Metal
 
INFO: 2021-09-04 18:26:25: Removing existing LVM snapshots
WARNING: 2021-09-04 18:26:25: LVM snapshot for 'opt' does not exist
WARNING: 2021-09-04 18:26:25: LVM snapshot for 'u01' does not exist
WARNING: 2021-09-04 18:26:25: LVM snapshot for 'root' does not exist
 
INFO: 2021-09-04 18:26:25: Checking current OS version
INFO: 2021-09-04 18:26:25: Checking LVM restore backgroud process
INFO: 2021-09-04 18:26:25: Checking LVM size
 
INFO: 2021-09-04 18:26:25: Boot device backup
INFO: 2021-09-04 18:26:25: Getting EFI device
INFO: 2021-09-04 18:26:25: ...step1 - unmounting EFI
INFO: 2021-09-04 18:26:25: ...step2 - making efi device backup
SUCCESS: 2021-09-04 18:26:29: ...EFI device backup saved as '/opt/odabr/out/hbi/efi.img'
INFO: 2021-09-04 18:26:29: ...step3 - checking EFI device backup
INFO: 2021-09-04 18:26:29: Getting boot device
INFO: 2021-09-04 18:26:29: ...step1 - making boot device backup using tar
SUCCESS: 2021-09-04 18:26:34: ...boot content saved as '/opt/odabr/out/hbi/boot.tar.gz'
INFO: 2021-09-04 18:26:34: ...step2 - unmounting boot
INFO: 2021-09-04 18:26:34: ...step3 - making boot device backup using dd
SUCCESS: 2021-09-04 18:26:37: ...boot device backup saved as '/opt/odabr/out/hbi/boot.img'
INFO: 2021-09-04 18:26:37: ...step4 - mounting boot
INFO: 2021-09-04 18:26:38: ...step5 - mounting EFI
INFO: 2021-09-04 18:26:38: ...step6 - checking boot device backup
 
INFO: 2021-09-04 18:26:38: Making OCR physical backup
INFO: 2021-09-04 18:26:41: ...ocr backup saved as '/opt/odabr/out/hbi/ocrbackup_38651.bck'
SUCCESS: 2021-09-04 18:26:41: OCR physical backup created successfully
INFO: 2021-09-04 18:26:41: OCR export backup
INFO: 2021-09-04 18:26:42: ...ocr export saved as '/opt/odabr/out/hbi/ocrexport_38651.bck'
SUCCESS: 2021-09-04 18:26:42: OCR export backup created successfully
 
INFO: 2021-09-04 18:26:42: Making LVM snapshot backup
SUCCESS: 2021-09-04 18:26:42: ...snapshot backup for 'opt' created successfully
SUCCESS: 2021-09-04 18:26:43: ...snapshot backup for 'u01' created successfully
SUCCESS: 2021-09-04 18:26:44: ...snapshot backup for 'root' created successfully
SUCCESS: 2021-09-04 18:26:44: LVM snapshots backup done successfully

Checking snapshot backups

To display the current running snapshot, use the following command:
[root@ODA01 hbi]# /opt/odabr/odabr infosnap
 
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
odabr - ODA node Backup Restore - Version: 2.0.1-66
Copyright Oracle, Inc. 2013, 2021
--------------------------------------------------------
Author: Ruggero Citton
RAC Pack, Cloud Innovation and Solution Engineering Team
│▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
 
 
LVM snap name Status COW Size Data%
------------- ---------- ---------- ------
root_snap active 15.00 GiB 0.01%
opt_snap active 60.00 GiB 0.01%
u01_snap active 90.00 GiB 0.01%

Deleting snapshot backups

To delete the snapshot backups, run:
[root@ODA01 ~]# /opt/odabr/odabr delsnap
INFO: 2021-07-21 11:12:18: Please check the logfile '/opt/odabr/out/log/odabr_35232.log' for more details
 
INFO: 2021-07-21 11:12:18: Removing LVM snapshots
INFO: 2021-07-21 11:12:18: ...removing LVM snapshot for 'opt'
SUCCESS: 2021-07-21 11:12:18: ...snapshot for 'opt' removed successfully
INFO: 2021-07-21 11:12:18: ...removing LVM snapshot for 'u01'
SUCCESS: 2021-07-21 11:12:19: ...snapshot for 'u01' removed successfully
INFO: 2021-07-21 11:12:19: ...removing LVM snapshot for 'root'
SUCCESS: 2021-07-21 11:12:19: ...snapshot for 'root' removed successfully
SUCCESS: 2021-07-21 11:12:19: Remove LVM snapshots done successfully