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
skip LVM PVs mounted on /dev/loop #2854
Conversation
@david-hill |
@rear/contributors |
It is not really an objection, but I would like to understand why is it needed when no such condition is needed for filesystems that sit directly on top of /dev/loop without LVM. At least, I don't see any such condition in the code. |
@pcahyna |
I didn't personally hit this issue and it's probably easy to reproduce . Create a file in /var/run/tmp of 10GB, create a LVM PV/VG on it and no LVs. Mount it as a loopback device (I think it's the only way) |
Thank you @david-hill for the information, I will attempt a reproducer myself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current fix here is not yet the right one, see
#2853 (comment)
I tried the proposed patch and even if we agree that skipping loop devices is what we want (cf. #2865 ), this approach is not entirely correct. While the patch fixes the case where there is no LV in the VG that resides on the loop device, it leads to another error when there actually is a LV - to demonstrate, this:
results in this error
The problem apparently is that the patch skips PVs on loop devices, but it does not exclude the VGs and LVs residing on them - the resulting layout has:
and no matching |
@pcahyna @jsmeix What is a loop device? The loop device is a block device that maps its data blocks not to a physical device such as a hard disk or optical disk drive, but to the blocks of a regular file in a filesystem or to another block device. Is it not the purpose of ReaR to map only physical devices? Or, do we make our scope wider to also cover loop devices? When we decide on this we can continue to work on this PR or just skipt it... |
@gdha As far as I understand it this means My reasoning (as far as I understand it): When something is mounted at a loop device When it is a file this file is restored from the backup. When it is another block device and that other block device When it is another block device but this other block device When it is another block device but this other block device As far as I can imagine this are all possible cases. For the above cases 1, 2, and 3 the actual data With the backup restore also config files get restored |
@jsmeix I suggest to continue the discussion of the merits of the proposal in #2865 , and discuss here only the details of the implementation (once we agree that it should be implemented). Concerning your last comment, "When something is mounted at a loop device that something is a file or another block device." this sounds confusing, because it seems you are speaking about the backing store the loop device is attached to (like a disk image file), rather than about what is mounted on the loop device (like a filesystem). |
Stale pull request message |
Type: Bug Fix / Enhancement
Impact: Normal
Reference to related issue (URL):
Let ReaR deal with LVM VGs without LVs #2853
How was this pull request tested?
Brief description of the changes in this pull request:
Skip physical volumes that are created on loop back devices like