New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let ReaR deal with LVM VGs without LVs #2853
Comments
@david-hill Could you copy/paste the output of the |
Is it a LVM mounted on a loop ? It has to be LVM otherwise you won't have any issues ... |
@david-hill Still need to see some output to understand it better... |
@gdha do you know how do the loop devices get skipped? I don't see any code to skip them under |
@david-hill could you please provide the |
@gdha I don't see that: dd if=/dev/zero of=/var/tmp/loopfs bs=1024 count=102400
mkfs.xfs /var/tmp/loopfs
mkdir /home/loopfs
mount -o loop /var/tmp/loopfs /home/loopfs
rear savelayout results in this in layout:
so, loop device is not skipped (unless it changed in ReaR 2.7; this was with ReaR 2.6). Not sure why loop devices on Ubuntu are skipped, aren't they mounted under something in |
@david-hill your issue is only tangentially related to loop devices. Using a PV/VG on a disk: parted --script -a optimal /dev/vdc -- mklabel gpt mkpart extra ext2 1M -1M set 1 lvm on
pvcreate --yes /dev/vdc1
vgcreate sigvg /dev/vdc1
rear savelayout results in the same error:
without any loop device involved. The underlying issue is that ReaR does not like volume groups without logical volumes. Unused volume groups may be unusual, but I think there is nothing really wrong with them, and PR #2603 fixed a bug ( #2596 ) where an unused PV (without VG) aborted mkrescue. So, by analogy, I think we should also allow a VG without any LV (either exclude it, or add it to the layout as empty). |
What to do with loop devices is a separate question, but I think should be addressed consistently for all storage objects on them (you see above that filesystems on loop devices are not being excluded either). |
I would suggest we just skip /dev/loop ... is there any possibility we have any useful data on there ? |
@pcahyna On my ubuntu ws the loop devices are of type squashfs, so this is the reason of exclusion. The one I created manually is included as you can see:
So, yes it would be better to exclude loop devices if they are not really required. |
Why shouldn't be any useful data on /dev/loop ? Is it because the backing files of loop devices can be already saved when the filesystem where they reside is backed up? This makes sense, but beware: if the loop devices are mounted or in any other way used (like being PVs for active VGs, esp. when using thin pools) when the backing files are being backed up, the backup will very likely be inconsistent. This is a similar reasoning like why we usually don't back up data by using just |
Let's keep this issue to For the separated question what to do with loop devices, cf. |
@pcahyna In general we do not know in ReaR what files are in the backup. So in general we cannot compare what files are in the backup Furthermore even with internal backup methods we do not know |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Stale issue message |
Relax-and-Recover (ReaR) Issue Template
rear should skip mounted loop devices
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
ReaR version ("/usr/sbin/rear -V"):
All
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
RHEL 8.4
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
Description of the issue (ideally so that others can reproduce it):
Workaround, if any:
Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
The text was updated successfully, but these errors were encountered: