Description of problem: In migration mode, the diskrestore.sh command has "lvcreate" lines, such as the one below: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- lvm lvcreate -L 1048576000b -n foolv foovg <<< y -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The "<<< y" is used to wipe the file system signature, if any is found. Unfortunately this doesn't always work, in particular when 2 signatures are found at different places: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- WARNING: xfs_external_log signature detected on /dev/foovg/foolv at offset 40960. Wipe it? [y/n]: Wiping xfs_external_log signature on /dev/foovg/foolv. WARNING: xfs_external_log signature detected on /dev/foovg/foolv at offset 45056. Wipe it? [y/n]: [n] Aborted wiping of xfs_external_log. 1 existing signature left on the device. -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The solution is to use "-y" to "lvcreate" instead. Version-Release number of selected component (if applicable): rear-2.4 (RHEL7+8) but also Upstream How reproducible: Don't know, a cust got this, I always only have 1 signature.
I think the same problem is reported in bz1974855 comment 7 This looks similar to bugs reported as bz1925531 and bz1919989, although happening at a different place. I wonder whether it is really worth investigating how to wipe old data on disks reliably, instead of just documenting that disks to restore to shall be clean.
"documenting that disks to restore to shall be cleadocumenting that disks to restore to shall be clean" --> this will never happen in real life, also for unattended restores wiping is necessary.
Btw, ReaR on S/390 takes a sledgehammer approach to disk wiping: it unconditionally performs a low level format (dasdfmt) of all available disks, even those that do not contain the system to be restored: bz1868421 comment 24. While it avoids issues as those, I consider it quite dangerous and would lile to submit a PR to remove this step. What do you think?
Right, performing a low level format may be dangerous.
Thanks for the report and investigation, I will try to propose a change upstream to pass "-y" to the appropriate commands. In the meantime, I suppose that using "wipefs" on the disks before calling ReaR might be a workaround.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (rear bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7654