import rear-2.4-16.el8
This commit is contained in:
parent
1fb3af268f
commit
bd731726a8
37
SOURCES/rear-bz1729502-ppc64-iso-level.patch
Normal file
37
SOURCES/rear-bz1729502-ppc64-iso-level.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 686fc5335c9b95388a095ced0abedbde8348bdf8 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Meixner <jsmeix@suse.com>
|
||||
Date: Mon, 23 Mar 2020 11:18:23 +0100
|
||||
Subject: [PATCH] Update 820_create_iso_image.sh
|
||||
|
||||
Have a hardcoded '-iso-level 3' option in output/ISO/Linux-ppc64le/820_create_iso_image.sh
|
||||
because it is also hardcoded in output/ISO/Linux-i386/820_create_iso_image.sh
|
||||
and it seems to also work in general on POWER architecture
|
||||
cf. https://github.com/rear/rear/issues/2344#issuecomment-601949828
|
||||
|
||||
Resolves: rhbz#1726043
|
||||
---
|
||||
.../rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh b/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh
|
||||
index 28b6464f..44b31b80 100644
|
||||
--- a/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh
|
||||
+++ b/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh
|
||||
@@ -17,7 +17,13 @@ else
|
||||
chrp_boot_option="-chrp-boot"
|
||||
fi
|
||||
|
||||
-$ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" -U $chrp_boot_option -R -J -volid "$ISO_VOLID" -v -graft-points "${ISO_FILES[@]}" >&2
|
||||
+# Have a hardcoded '-iso-level 3' option also here because it is
|
||||
+# also hardcoded in output/ISO/Linux-i386/820_create_iso_image.sh
|
||||
+# and it seems to also work in general on POWER architecture
|
||||
+# cf. https://github.com/rear/rear/issues/2344#issuecomment-601949828
|
||||
+$ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" \
|
||||
+ -U $chrp_boot_option -R -J -volid "$ISO_VOLID" -v -iso-level 3 -graft-points \
|
||||
+ "${ISO_FILES[@]}" >&2
|
||||
|
||||
StopIfError "Could not create ISO image (with $ISO_MKISOFS_BIN)"
|
||||
popd >&2
|
||||
--
|
||||
2.25.4
|
||||
|
336
SOURCES/rear-bz1743303-rubrik.patch
Normal file
336
SOURCES/rear-bz1743303-rubrik.patch
Normal file
@ -0,0 +1,336 @@
|
||||
From 9a2e5bf96df70883fc5978471f72d6bd697116e0 Mon Sep 17 00:00:00 2001
|
||||
From: Damani <damani@rubrik.com>
|
||||
Date: Thu, 26 Sep 2019 08:27:53 -0600
|
||||
Subject: [PATCH] Support for Rubrik
|
||||
|
||||
---
|
||||
.gitignore | 3 +
|
||||
doc/user-guide/16-Rubrik-CDM.adoc | 106 ++++++++++++++++++
|
||||
usr/share/rear/conf/default.conf | 11 ++
|
||||
.../rear/prep/CDM/default/400_prep_cdm.sh | 7 ++
|
||||
.../prep/CDM/default/450_check_cdm_client.sh | 13 +++
|
||||
.../CDM/default/400_restore_with_cdm.sh | 19 ++++
|
||||
.../410_use_replica_cdm_cluster_cert.sh | 43 +++++++
|
||||
.../CDM/default/430_gen_rbs_uuid_for_cdm.sh | 29 +++++
|
||||
.../verify/CDM/default/450_start_cdm_rbs.sh | 17 +++
|
||||
9 files changed, 248 insertions(+)
|
||||
create mode 100644 doc/user-guide/16-Rubrik-CDM.adoc
|
||||
create mode 100644 usr/share/rear/prep/CDM/default/400_prep_cdm.sh
|
||||
create mode 100644 usr/share/rear/prep/CDM/default/450_check_cdm_client.sh
|
||||
create mode 100644 usr/share/rear/restore/CDM/default/400_restore_with_cdm.sh
|
||||
create mode 100644 usr/share/rear/verify/CDM/default/410_use_replica_cdm_cluster_cert.sh
|
||||
create mode 100644 usr/share/rear/verify/CDM/default/430_gen_rbs_uuid_for_cdm.sh
|
||||
create mode 100644 usr/share/rear/verify/CDM/default/450_start_cdm_rbs.sh
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 5e3dc940..a644c865 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -4,3 +4,6 @@
|
||||
build-stamp
|
||||
/var
|
||||
/etc/rear/site.conf
|
||||
+.DS_Store
|
||||
+.vscode
|
||||
+servers
|
||||
diff --git a/doc/user-guide/16-Rubrik-CDM.adoc b/doc/user-guide/16-Rubrik-CDM.adoc
|
||||
new file mode 100644
|
||||
index 00000000..41f37d20
|
||||
--- /dev/null
|
||||
+++ b/doc/user-guide/16-Rubrik-CDM.adoc
|
||||
@@ -0,0 +1,106 @@
|
||||
+= Documentation for the Rubrik Cloud Data Management (CDM) Backup and Restore Method
|
||||
+
|
||||
+== Summary
|
||||
+
|
||||
+The Rubrik CDM backup and restore method for ReaR allows Rubrik CDM to perform bare metal recovery of Linux systems that are supported by ReaR. It does this by including the installed Rubrik CDM RBS agent files in the ISO that is created by `rear mkrescue` via a pre-script in the fileset. The ISO is left in place under `/var/lib/rear/output/rear-<hostname>.iso` by default. During the fileset backup Rubrik will backup the main operating system files as well as the ReaR ISO file.
|
||||
+
|
||||
+Bare Metal Recovery is performed by first restoring the ReaR ISO file from Rubrik CDM to an alternate host. Next the host being restored is booted from the ISO via CD/DVD, USB, vSphere Datastore ISO, etc... Once booted running `rear recover` will prepare the host for restore and start the Rubrik CDM RBS agent. If the host has a new IP address the new RBS agent will need to be registered with the Rubrik cluster. Registration is not necessary if the recovery host is reusing the same IP address as the original. All of the files for the host are then recovered from Rubrik CDM to the recovery host's `/mnt/local` directory by the user. Once complete the user exit's ReaR and reboots the host.
|
||||
+
|
||||
+== Configuration
|
||||
+
|
||||
+1. Install and configure ReaR in accordance with:
|
||||
+- Red Hat
|
||||
+ * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-relax-and-recover_rear
|
||||
+- Ubuntu
|
||||
+ * http://manpages.ubuntu.com/manpages/disco/en/man8/rear.8.html
|
||||
+- SUSE
|
||||
+ * https://en.opensuse.org/SDB:Disaster_Recovery
|
||||
+ * https://documentation.suse.com/sle-ha/15-SP1/html/SLE-HA-all/cha-ha-rear.html
|
||||
+- Generic
|
||||
+ * https://github.com/rear/rear
|
||||
+
|
||||
+ NOTE: Ignore any instructions to configure external storage like NFS, CIFS/SMB or ftp. Also ignore any instructions to configure a specific backup method. This will be taken care of in the next steps.
|
||||
+
|
||||
+ NOTE: Ignore any instructions to schedule ReaR to run via the host based scheduler (cron). Rubrik CDM will run ReaR via a pre-script in the fileset. If this is not preferred ReaR can be scheduled on the host, however, the ISOs created may not be in sync with the backups.
|
||||
+
|
||||
+ NOTE: If installing the pre-release or development version for which there is no installer, copy the repo to the host being protected. Then run `make install` from its root directory of the repo.
|
||||
+
|
||||
+1. Install the Rubrik CDM RBS agent as directed by the Rubrik documentation.
|
||||
+1. Edit `/etc/rear/local.conf` and enter:
|
||||
+
|
||||
+ OUTPUT=ISO
|
||||
+ BACKUP=CDM
|
||||
+
|
||||
+1. Test `ReaR` by running `rear -v mkrescue`
|
||||
+1. Configure fileset backup of the host and add `/usr/sbin/rear mkrescue` as a prescript.
|
||||
+1. ISOs will be saved as `/var/lib/rear/output/*.iso`
|
||||
+
|
||||
+- Recovery
|
||||
+
|
||||
+1. Recover `/var/lib/rear/output/rear-<hostname>.iso` from host to be restored.
|
||||
+1. Boot recovery machine using recovered ISO.
|
||||
+
|
||||
+ NOTE: Recovered system will use the same networking as the original machine. Verify no IP conflicts will occur.
|
||||
+
|
||||
+ NOTE: If the same static IP address may be used it will need to be changed if the original machine is still running.
|
||||
+
|
||||
+1. Verify Firewall is down on recovery host.
|
||||
+1. Run `rear recover`
|
||||
+1. Answer inline questions until `rear>` prompt appears.
|
||||
+1. Run `ps -eaf` and verify that `backup_agent_main` and `bootstrap_agent_main` are running.
|
||||
+1. Get the IP address of the system using `ip addr`
|
||||
+1. Register the new IP with the Rubrik appliance (if needed)
|
||||
+1. Perform a re-directed export of `/` to `/mnt/local`
|
||||
+1. Reboot
|
||||
+1. Recover other file systems as needed.
|
||||
+
|
||||
+ Note: that the Rubrik RBS agent will connect as the original machine now. The host may need to be reinstalled and re-registered if the original machine is still running.
|
||||
+
|
||||
+== Known Issues
|
||||
+
|
||||
+* Recovery via IPv6 is not yet supported.
|
||||
+* Automatic recovery from replica CDM cluster is not supported
|
||||
+* CDM may take some time to recognize that the IP address has moved from one system to another. When restoring using the same IP give CDM up to 10 minutes to recognize that the agent is running on another machine. This usually comes up during testing when the original machine is shutdown but not being restored to.
|
||||
+* Recovery from a replica CDM cluster is only supported with CDM v4.2.1 and higher.
|
||||
+* Care must be taken with SUSE systems on DHCP. They tend to request the same IP as the original host. If this is not the desired behavior the system will have to be adjusted after booting from the ReaR ISO.
|
||||
+* If multiple restores are performed using the same temporary IP, the temporary IP must first be deleted from Servers & Apps -> Linux and Unix Servers and re-added upon each reuse.
|
||||
+* ReaR's `ldd` check of other binaries or libraries may result in libraries not being found. This can generally be fixed by adding the path to those libraries to the `LD_LIBRARY_PATH` variable in `/etc/rear/local.conf`. Do this by adding the following line in `/etc/rear/local.conf`:
|
||||
++
|
||||
+ export LD_LIBRARY_PATH-"$LD_LIBRARY_PATH:<path>"
|
||||
++
|
||||
+To make CentoOS v7.7 work the following line was needed:
|
||||
++
|
||||
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib64/bind9-export"
|
||||
++
|
||||
+To make CentOS v8.0 work the following line was needed:
|
||||
++
|
||||
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib64/bind9-export:/usr/lib64/eog:/usr/lib64/python3.6/site-packages:/usr/lib64/samba:/usr/lib64/firefox"
|
||||
+
|
||||
+== Troubleshooting
|
||||
+
|
||||
+* Verify that ReaR will recover your system without using the CDM backup and restore method. Most errors are due to configuration with ReaR itself and not Rubrik CDM. Use the default ReaR backup and restore method to test with.
|
||||
+* Follow the OS specific configuration guides as mentioned at the beginning of this document.
|
||||
+
|
||||
+== Test Matrix
|
||||
+
|
||||
+.Test Matrix
|
||||
+[%header,format=csv]
|
||||
+|===
|
||||
+Operating System,DHCP,Static IP,Virtual,Physical,LVM Root Disk,Plain Root Disk,EXT3,EXT4,XFS,BTRFS,Original Cluster,Replication Cluster
|
||||
+CentOS 7.3,,pass,Pass,,Pass,,,,Pass,,Pass,
|
||||
+CentOS 7.6,Pass,,Pass,,Pass,,,,Pass,,Pass,
|
||||
+CentOS 7.7,Pass,,Pass,Pass,Pass,,,,Pass,,Pass,
|
||||
+CentOS 8.0,Pass,,Pass,,Pass,,,,Pass,,Pass,
|
||||
+CentOS 5.11,,,,,,,,,,,,
|
||||
+CentOS 6.10,,,,,,,,,,,,
|
||||
+RHEL 7.6,Pass,,Pass,,Pass,,,,,,,
|
||||
+RHEL 7.4,,,,,,,,,,,,
|
||||
+RHEL 6.10,,,,,,,,,,,,
|
||||
+SUSE 11 SP4,,,,,,,,,,,,
|
||||
+SUSE 12 SP4,Pass (uses same IP as original),,Pass,,,,,,,Pass,Pass,
|
||||
+Ubuntu 14.04 LTS,,,,,,,,,,,,
|
||||
+Ubuntu 16.04 LTS,Pass,,,,Pass,,,Pass,,,Pass,
|
||||
+Ubuntu 17.04 LTS,,,,,,,,,,,,
|
||||
+|===
|
||||
+
|
||||
+* Empty cells indicate that no tests were run.
|
||||
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
|
||||
index b9f10e89..692e1874 100644
|
||||
--- a/usr/share/rear/conf/default.conf
|
||||
+++ b/usr/share/rear/conf/default.conf
|
||||
@@ -1334,6 +1334,17 @@ LANG_RECOVER=C
|
||||
# low-quality master encryption key. For details, see the cryptsetup(8) manual page.
|
||||
LUKS_CRYPTSETUP_OPTIONS="--iter-time 2000 --use-random"
|
||||
|
||||
+##
|
||||
+# BACKUP=CDM (Rubrik CDM; Cloud Data Managemnt)
|
||||
+##
|
||||
+# ReaR support for Rubrik Cloud Data Managment (CDM).
|
||||
+# ReaR will copy the Rubrk RBS agent and required OS binaries to its ISO for incluson on boot.
|
||||
+# ReaR will start the Rubrik RBS agent when 'rear recover' is run.
|
||||
+COPY_AS_IS_CDM=( /etc/rubrik /usr/bin/rubrik /var/log/rubrik /etc/pki /usr/lib64 )
|
||||
+COPY_AS_IS_EXCLUDE_CDM=( /var/log/rubrik/* )
|
||||
+PROGS_CDM=( /usr/bin/rubrik/backup_agent_main /usr/bin/rubrik/bootstrap_agent_main openssl uuidgen )
|
||||
+
|
||||
+
|
||||
##
|
||||
# BACKUP=FDRUPSTREAM stuff
|
||||
##
|
||||
diff --git a/usr/share/rear/prep/CDM/default/400_prep_cdm.sh b/usr/share/rear/prep/CDM/default/400_prep_cdm.sh
|
||||
new file mode 100644
|
||||
index 00000000..d3fd11b7
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/prep/CDM/default/400_prep_cdm.sh
|
||||
@@ -0,0 +1,7 @@
|
||||
+#
|
||||
+# prepare stuff for CDM
|
||||
+#
|
||||
+
|
||||
+COPY_AS_IS=( "${COPY_AS_IS[@]}" "${COPY_AS_IS_CDM[@]}" )
|
||||
+COPY_AS_IS_EXCLUDE=( "${COPY_AS_IS_EXCLUDE[@]}" "${COPY_AS_IS_EXCLUDE_CDM[@]}" )
|
||||
+PROGS=( "${PROGS[@]}" "${PROGS_CDM[@]}" fmt )
|
||||
diff --git a/usr/share/rear/prep/CDM/default/450_check_cdm_client.sh b/usr/share/rear/prep/CDM/default/450_check_cdm_client.sh
|
||||
new file mode 100644
|
||||
index 00000000..637fac5f
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/prep/CDM/default/450_check_cdm_client.sh
|
||||
@@ -0,0 +1,13 @@
|
||||
+# 450_check_cdm_client.sh
|
||||
+#
|
||||
+# This script checks if a Rubrik CDM client is installed and running
|
||||
+#
|
||||
+
|
||||
+Log "Backup method is Rubrik (CDM): check backup_agent_main"
|
||||
+if [ ! -x /usr/bin/rubrik/backup_agent_main ]; then
|
||||
+ StopIfError 1 "Please install Rubrik (CDM) RBS client software."
|
||||
+fi
|
||||
+
|
||||
+ps ax | grep -v grep | grep backup_agent_main
|
||||
+StopIfError $? "Rubrik (CDM) RBS backup_agent_main was not running on this client."
|
||||
+
|
||||
diff --git a/usr/share/rear/restore/CDM/default/400_restore_with_cdm.sh b/usr/share/rear/restore/CDM/default/400_restore_with_cdm.sh
|
||||
new file mode 100644
|
||||
index 00000000..bc4811c4
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/restore/CDM/default/400_restore_with_cdm.sh
|
||||
@@ -0,0 +1,19 @@
|
||||
+# 400_restore_with_cdm.sh
|
||||
+#
|
||||
+#
|
||||
+
|
||||
+LogPrint "Please start the restore process on the Rubrik (CDM) cluster."
|
||||
+
|
||||
+if is_true $CDM_NEW_AGENT_UUID; then
|
||||
+ LogPrint ""
|
||||
+ LogPrint "Register the appropriate IP address from this list with Rubrik (CDM):"
|
||||
+ LogPrint "$( ip addr | grep inet | cut -d / -f 1 | grep -v 127.0.0.1 | grep -v ::1 )"
|
||||
+ LogPrint ""
|
||||
+fi
|
||||
+LogPrint "Make sure all required data is restored to $TARGET_FS_ROOT ."
|
||||
+LogPrint ""
|
||||
+LogPrint "Next type 'exit' to continue the recovery."
|
||||
+LogPrint "Info: You can check the recovery process i.e. with the command 'df'."
|
||||
+LogPrint ""
|
||||
+
|
||||
+rear_shell "Has the restore been completed and are you ready to continue the recovery?"
|
||||
diff --git a/usr/share/rear/verify/CDM/default/410_use_replica_cdm_cluster_cert.sh b/usr/share/rear/verify/CDM/default/410_use_replica_cdm_cluster_cert.sh
|
||||
new file mode 100644
|
||||
index 00000000..7f18f27a
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/verify/CDM/default/410_use_replica_cdm_cluster_cert.sh
|
||||
@@ -0,0 +1,43 @@
|
||||
+# 410_use_replica_cdm_cluster_cert.sh
|
||||
+# If restoring from a replica Rubrik (CDM) cluster use it's cert for RBS.
|
||||
+
|
||||
+CDM_RBA_DIR=/etc/rubrik
|
||||
+CDM_KEYS_DIR=${CDM_RBA_DIR}/keys
|
||||
+
|
||||
+# When USER_INPUT_CDM_REPLICA_CLUSTER has any 'true' value be liberal in what you accept and assume exactly 'y' was actually meant:
|
||||
+LogPrint ""
|
||||
+is_true "$USER_INPUT_CDM_REPLICA_CLUSTER" && USER_INPUT_CDM_REPLICA_CLUSTER="y"
|
||||
+while true ; do
|
||||
+ # Find out if the restore is being done from the original CDM cluster or a Replica
|
||||
+ # the default (i.e. the automated response after the timeout) should be 'n':
|
||||
+ answer="$( UserInput -I CDM_REPLICA_CLUSTER -p "Is the data being restored from the original CDM Cluster? (y/n)" -D 'y' -t 300 )"
|
||||
+ is_true "$answer" && return 0
|
||||
+ if is_false "$answer" ; then
|
||||
+ break
|
||||
+ fi
|
||||
+ UserOutput "Please answer 'y' or 'n'"
|
||||
+done
|
||||
+
|
||||
+while true; do
|
||||
+ CDM_CLUSTER_IP="$(UserInput -I USER_INPUT_CDM_CLUSTER_IP -r -t 0 -p "Enter one of the IP addresses for the replica CDM cluster: ")"
|
||||
+ [[ -n "$CDM_CLUSTER_IP" ]] && break
|
||||
+ PrintError "Please enter a non-empty CDM cluster IP."
|
||||
+done
|
||||
+
|
||||
+CDM_SUNOS_TAR=rubrik-agent-sunos5.10.sparc.tar.gz
|
||||
+cd /tmp
|
||||
+/usr/bin/curl $v -kLOJ https://${CDM_CLUSTER_IP}/connector/${CDM_SUNOS_TAR}
|
||||
+StopIfError "Could not download https://${CDM_CLUSTER_IP}/connector/${CDM_SUNOS_TAR}"
|
||||
+
|
||||
+/usr/bin/tar $v -xzf $CDM_SUNOS_TAR
|
||||
+StopIfError "Could not extract $CDM_SUNOS_TAR"
|
||||
+
|
||||
+CDM_CERT_FILE=$(find ./ -name "rubrik.crt")
|
||||
+mv $v ${CDM_KEYS_DIR}/rubrik.crt ${CDM_KEYS_DIR}/rubrik.crt.orig
|
||||
+cp $v $CDM_CERT_FILE $CDM_KEYS_DIR
|
||||
+StopIfError "Could not copy replica CDM cluster certificate"
|
||||
+
|
||||
+/usr/bin/chmod $v 600 ${CDM_KEYS_DIR}/rubrik.crt
|
||||
+
|
||||
+
|
||||
+LogPrint "Replica Rubrik (CDM) cluster certificate installed."
|
||||
diff --git a/usr/share/rear/verify/CDM/default/430_gen_rbs_uuid_for_cdm.sh b/usr/share/rear/verify/CDM/default/430_gen_rbs_uuid_for_cdm.sh
|
||||
new file mode 100644
|
||||
index 00000000..5e99b79c
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/verify/CDM/default/430_gen_rbs_uuid_for_cdm.sh
|
||||
@@ -0,0 +1,29 @@
|
||||
+# 430_gen_rbs_uuid_for_cdm.sh
|
||||
+# Reset the UUID used by RBS if the IP address has changed
|
||||
+
|
||||
+CDM_RBA_DIR=/etc/rubrik
|
||||
+CDM_AGENT_UUID=${CDM_RBA_DIR}/conf/uuid
|
||||
+
|
||||
+# When USER_INPUT_CDM_SAME_AGENT_UUID has Does this client have the same IP address as the original 'y' was actually meant:
|
||||
+LogPrint ""
|
||||
+LogPrint "Found the following IP addresses on this system:"
|
||||
+LogPrint "$( ip addr | grep inet | cut -d / -f 1 | grep -v 127.0.0.1 | grep -v ::1 )"
|
||||
+LogPrint ""
|
||||
+is_true "$USER_INPUT_CDM_SAME_AGENT_UUID" && USER_INPUT_SAME_AGENT_UUID="y"
|
||||
+while true ; do
|
||||
+ # Find out if the IP address has changed from the original. If so generate a new UUID.
|
||||
+ # the default (i.e. the automated response after the timeout) should be 'n':
|
||||
+ answer="$( UserInput -I CDM_SAME_AGENT_UUID -p "Does this client have the same IP address as the original? (y/n)" -D 'y' -t 300 )"
|
||||
+ is_true "$answer" && return 0
|
||||
+ if is_false "$answer" ; then
|
||||
+ break
|
||||
+ fi
|
||||
+ UserOutput "Please answer 'y' or 'n'"
|
||||
+done
|
||||
+
|
||||
+mv $v ${CDM_AGENT_UUID} ${CDM_AGENT_UUID}.old
|
||||
+/usr/bin/uuidgen | tee -a ${CDM_AGENT_UUID} >&2
|
||||
+StopIfError "Unable to generate new UUID"
|
||||
+
|
||||
+CDM_NEW_AGENT_UUID="true"
|
||||
+LogPrint "Rubrik (CDM) RBS agent now has new UUID."
|
||||
diff --git a/usr/share/rear/verify/CDM/default/450_start_cdm_rbs.sh b/usr/share/rear/verify/CDM/default/450_start_cdm_rbs.sh
|
||||
new file mode 100644
|
||||
index 00000000..571da1da
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/verify/CDM/default/450_start_cdm_rbs.sh
|
||||
@@ -0,0 +1,17 @@
|
||||
+# 450_start_cdm_rbs.sh
|
||||
+# Start the Rubrik (CDM) RBS Agent
|
||||
+
|
||||
+RBA_DIR=/etc/rubrik
|
||||
+RBA_BIN_DIR=/usr/bin/rubrik
|
||||
+
|
||||
+BOOTSTRAP_DAEMON_OPTS="$( < ${RBA_DIR}/conf/bootstrap_flags.conf )"
|
||||
+AGENT_DAEMON_OPTS="$( < ${RBA_DIR}/conf/agent_flags.conf )"
|
||||
+BOOTSTRAP_DAEMON=$RBA_BIN_DIR/bootstrap_agent_main
|
||||
+AGENT_DAEMON=$RBA_BIN_DIR/backup_agent_main
|
||||
+
|
||||
+$BOOTSTRAP_DAEMON $BOOTSTRAP_DAEMON_OPTS
|
||||
+StopIfError "Unable to start RBS Bootstrap service"
|
||||
+$AGENT_DAEMON $AGENT_DAEMON_OPTS
|
||||
+StopIfError "Unable to start RBS Agent service"
|
||||
+
|
||||
+LogPrint "Rubrik (CDM) RBS agent started."
|
||||
--
|
||||
2.25.4
|
||||
|
60
SOURCES/rear-bz1843809-skip-longhorn.patch
Normal file
60
SOURCES/rear-bz1843809-skip-longhorn.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From 2dbd93153df83aef0d413c104335b4e035a81c02 Mon Sep 17 00:00:00 2001
|
||||
From: Gratien D'haese <gratien.dhaese@gmail.com>
|
||||
Date: Thu, 16 Apr 2020 16:54:18 +0200
|
||||
Subject: [PATCH] skip Longhorn Engine replica devices
|
||||
|
||||
Resolves: https://github.com/rear/rear/issues/2365
|
||||
|
||||
Signed-off-by: Gratien D'haese <gratien.dhaese@gmail.com>
|
||||
---
|
||||
.../save/GNU/Linux/230_filesystem_layout.sh | 31 ++++++++++++++++++-
|
||||
1 file changed, 30 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh
|
||||
index 60306718..afc658a6 100644
|
||||
--- a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh
|
||||
+++ b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh
|
||||
@@ -111,10 +111,39 @@ fi
|
||||
# but ensure docker_root_dir is not empty (otherwise any mountpoint string matches "^" which
|
||||
# would skip all mountpoints), see https://github.com/rear/rear/issues/1989#issuecomment-456054278
|
||||
if test "$docker_root_dir" ; then
|
||||
- if echo "$mountpoint" | grep -q "^$docker_root_dir" ; then
|
||||
+ if echo "$mountpoint" | grep -q "^${docker_root_dir}/" ; then
|
||||
Log "Filesystem $fstype on $device mounted at $mountpoint is below Docker Root Dir $docker_root_dir, skipping."
|
||||
continue
|
||||
fi
|
||||
+ # In case Longhorn is rebuilding a replica device it will show up as a pseudo-device and when that is the
|
||||
+ # case then you would find traces of it in the /var/lib/rear/layout/disklayout.conf file, which would
|
||||
+ # break the recovery as Longhorn Engine replica's are under control of Rancher Longhorn software and these are
|
||||
+ # rebuild automatically via kubernetes longhorn-engine pods.
|
||||
+ # Issue where we discovered this behavior was #2365
|
||||
+ # In normal situations you will find traces of longhorn in the log saying skipping non-block devices.
|
||||
+ # For example an output of the 'df' command:
|
||||
+ # /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 82045336 4500292 77528660 6% /var/lib/kubelet/pods/7f47aa55-30e2-4e7b-8fec-ec9a1e761352/volumes/kubernetes.io~csi/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792/mount
|
||||
+ # lsscsi shows it as:
|
||||
+ # [34:0:0:0] storage IET Controller 0001 -
|
||||
+ # [34:0:0:1] disk IET VIRTUAL-DISK 0001 /dev/sdf
|
||||
+ # ls -l /dev/sdf /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792
|
||||
+ # brw-rw---- 1 root disk 8, 80 Apr 17 12:02 /dev/sdf
|
||||
+ # brw-rw---- 1 root root 8, 64 Apr 17 10:36 /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792
|
||||
+ # and parted says:
|
||||
+ # parted /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 print
|
||||
+ # Model: IET VIRTUAL-DISK (scsi)
|
||||
+ # Disk /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792: 85.9GB
|
||||
+ # Sector size (logical/physical): 512B/512B
|
||||
+ # Partition Table: loop
|
||||
+ # Disk Flags:
|
||||
+ # Number Start End Size File system Flags
|
||||
+ # 1 0.00B 85.9GB 85.9GB ext4
|
||||
+ # => as result (without the next if clausule) we would end up with an entry in the disklayout.conf file:
|
||||
+ # fs /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 /var/lib/kubelet/pods/61ed399a-d51b-40b8-8fe8-a78e84a1dd0b/volumes/kubernetes.io~csi/pvc-c65df331-f1c5-466a-9731-b2aa5e6da714/mount ext4 uuid=4fafdd40-a9ae-4b62-8bfb-f29036dbe3b9 label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
|
||||
+ if echo "$device" | grep -q "^/dev/longhorn/pvc-" ; then
|
||||
+ Log "Longhorn Engine replica $device, skipping."
|
||||
+ continue
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
# Replace a symbolic link /dev/disk/by-uuid/a1b2c3 -> ../../sdXn
|
||||
--
|
||||
2.25.4
|
||||
|
@ -3,7 +3,7 @@
|
||||
Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool
|
||||
Name: rear
|
||||
Version: 2.4
|
||||
Release: 12%{?dist}
|
||||
Release: 16%{?dist}
|
||||
License: GPLv3
|
||||
Group: Applications/File
|
||||
URL: http://relax-and-recover.org/
|
||||
@ -29,6 +29,9 @@ Patch21: rear-bz1711123.patch
|
||||
Patch22: rear-bz1692575.patch
|
||||
Patch23: rear-sfdc02343208.patch
|
||||
Patch24: rear-bz1737042.patch
|
||||
Patch25: rear-bz1743303-rubrik.patch
|
||||
Patch26: rear-bz1729502-ppc64-iso-level.patch
|
||||
Patch27: rear-bz1843809-skip-longhorn.patch
|
||||
|
||||
ExcludeArch: s390x
|
||||
ExcludeArch: s390
|
||||
@ -134,6 +137,9 @@ fi
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
|
||||
echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron
|
||||
|
||||
@ -167,6 +173,22 @@ TZ=UTC %{__make} -C doc
|
||||
%{_sbindir}/rear
|
||||
|
||||
%changelog
|
||||
* Thu Jun 04 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-16
|
||||
- Apply upstream PR2373: Skip Longhorn Engine replica devices
|
||||
Resolves: rhbz1843809
|
||||
|
||||
* Mon Jun 01 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-15
|
||||
- Apply upstream PR2346: Have '-iso-level 3' option also for ppc64le
|
||||
Resolves: rhbz1729502
|
||||
|
||||
* Mon Jun 01 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-14
|
||||
- Backport remaining Rubrik related patches.
|
||||
Related: rhbz1743303
|
||||
|
||||
* Thu May 21 2020 Václav Doležal <vdolezal@redhat.com> - 2.4-13
|
||||
- Backport upstream PR #2249 to add support for Rubrik backup method.
|
||||
Resolves: rhbz1743303
|
||||
|
||||
* Mon Dec 16 2019 Pavel Cahyna <pcahyna@redhat.com> - 2.4-12
|
||||
- Backport upstream PR #2293 to use grub-mkstandalone instead of
|
||||
grub-mkimage for UEFI (ISO image and GRUB_RESCUE image generation).
|
||||
|
Loading…
Reference in New Issue
Block a user