-
-
Notifications
You must be signed in to change notification settings - Fork 265
EXCLUDE_COMPONENTS in 200_partition_layout.sh #3455
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
Conversation
In layout/save/GNU/Linux/200_partition_layout.sh addeed a makeshift to exclude unwanted disks from the very beginning via EXCLUDE_COMPONENTS to help the user to avoid issues with unneeded disks where the subsequent code fails e.g. as in #2995 where parted did not recognize a partition table that is recognized both by the kernel and fdisk.
More explicit wording in message: `does not also` -> `does not automatically` because it is not done automatically so it must be also done manually.
In default.conf describe how EXCLUDE_COMPONENTS can be used in exceptional cases to exclude unwanted disks from the very beginning
The changes in this pull request result a different behaviour Reason:
one can exclude a device (e.g. /dev/sdg) directly On my same SLES15 test VM as above
So with current GitHub master code
perfectly excludes /dev/sdb plus automatically I guess it won't automatically exclue higher level In contrast with the changes in this pull request I get
So with the changes in this pull request |
My current offhanded (in particular not yet tested) idea With e.g.
do not skip '/dev/sdb' in 200_partition_layout.sh My reasoning behind is: When a disk is listed in When 'parted' works to recognize the disk and its partitions When 'parted' fails to recognize a disk and/or partitions The point is that ReaR should not error out when a |
In layout/save/GNU/Linux/200_partition_layout.sh do not Error() exit but only DebugPrint when extract_partitions() is called for a disk which is specified in EXCLUDE_COMPONENTS see #3455 (comment)
In default.conf describe how EXCLUDE_COMPONENTS could be used to exclude unneeded normal disks and even unneeded problematic disks where the disk and/or things on it cannot be recognized properly, e.g. if 'parted' fails to recognize the partition table.
With my recent changes
|
What I cannot test is how it behaves with my recent changes |
With the help of I downloaded On my KVM/QEMU test VM I created a disk 'sdc' with 1GiB size. I did 'dd' the ubuntu-24.04.1-desktop-amd64.iso onto /dev/sdc
The disk cannot be properly recognized by 'parted'
In particular 'parted' shows
But 'fdisk' can recognize it
Also 'lsblk' can list it
With
So with plain Then I tried how it behaves when there is a mounted filesystem
So with plain I assume one has to exclude higher level storage objects |
In default.conf describe more generically how to exclude a problematic disk with higher level storage objects on it.
An addendum FYI: When a disk has no mounted filesystem
BUT
because for a disk which is not properly recognized How that looks for me on my test VM
The excluding happens primarily |
@rear/contributors |
The intent is to provide a feasible way out for the user
in particular for exceptional cases when there is
an unwanted and unneeded disk in his system
which causes trouble for ReaR - for example as in
#2995 and
#3433
where parted failed because of incorrect partitioning
which as a consequence makes ReaR fail.
Impact: Normal
Reference to related issues (URLs):
#2995
#3433
My current changes are described below starting at
#3455 (comment)
My initial and meanwhile outdated changes
caused a regression which I described below in
#3455 (comment)
Because of the regression
I had to completely change the implementation
from my initial dirty hack makeshift
towards a (hopefully) proper solution.
My initial and meanwhile outdated changes were:
In layout/save/GNU/Linux/200_partition_layout.sh
added a makeshift to exclude unwanted disks
from the very beginning via EXCLUDE_COMPONENTS
to help the user to avoid issues with unneeded disks
where the subsequent code fails e.g. as in
#2995
where parted did not recognize a partition table
that is recognized both by the kernel and fdisk
or as in
#3433
where also parted failed for an unused disk
which has somewhat incorrect partitioning.
For the test on a SLES15 VM
I added second disk sdb with two partitions
each one with ext4 filesystem that is mounted
My current test results are described below starting at
#3455 (comment)
and subsequent comments.
My meanwhile outdated test results from my initial changes were:
My local.conf contains
With that I get
I also did "rear mkbackuponly"
and then tested "rear recover"
on another VM without a second disk sdb
and - at least for me - it "just worked"
(i.e. nothing about 'sdb' during "rear recover")
so sdb is really completely skipped for recovery.