#3544 Issue open: "rear recover" disk values consistency check (prerequirement to fix MIGRATION_MODE issues)¶
Labels: discuss / RFC, severe improvement
jsmeix opened issue at 2025-12-09 14:57:¶
Currently we cannot fix our generic MIGRATION_MODE issues like
https://github.com/rear/rear/issues/3505
"MIGRATION_MODE inconsistencies: disklayout.conf (et al.) versus
local.conf (et al.)"
https://github.com/rear/rear/issues/3477
"Disk mappings should be also applied to user configuration values"
https://github.com/rear/rear/issues/3473
"ReaR automatisms overwrite sacrosanct user specified values"
One reason why we cannot fix those issues is that currently
... the apply_layout_mappings() function
is "just run" on the original file (via 'sed -i')
and no backup of the original file is made
so after the apply_layout_mappings() function was run
one cannot tell by looking at e.g. /etc/rear/local.conf
if it is still the original one or a changed one
because there is only one /etc/rear/local.conf
https://github.com/rear/rear/issues/3473#issuecomment-2898257250
This reason is a separated problem which is not planned
to be handled by this issue (but perhaps it could be
needed as a prerequirement to get this issue done).
Another reason why we cannot fix those issues is
that currently we have no way to tell if the disk values
in config files (e.g. disklayout.conf local.conf rescue.conf)
are consistent (i.e. globally consistent over all config files).
This reason is handled by this issue.
What is currently implemeted is a mess
which was grown over a long period of time
by individual and mostly independent contributions
of this and that automated "just works" functionality plus
these and those "final power to the user" functionalities, cf.
https://github.com/rear/rear/issues/3473#issuecomment-2897958402
Because in particular disklayout.conf and local.conf
are meant to be adapted by the user as needed for different
replacement hardware before launching "rear recover", cf.
https://github.com/rear/rear/issues/3505#issue-3293268233
it would help the user to have an automated check
if his manual adaptions "seem to be consistent".
Because of
https://github.com/rear/rear/issues/3505
it would help us to have an automated check
if our automated adaptions "seem to be consistent".
Because of both it would help both us and our users
to have an automated check if the user's manual adaptions
together with our automated adaptions "seem to be consistent".
I think it is not possible with reasonable effort within reasonable
time
to implement a fully correctly working consistency check
(in particular not with arbitrarily complicated disk layouts).
Therefore I wrote "seem to be consistent" which means for now
some consistency checks which work reasonably well in practice
so a reasonable first step could be implemented for ReaR 3.0,
cf. the basic idea behind
https://github.com/rear/rear/wiki/Coding-Style#dirty-hacks-welcome
[Export of Github issue for rear/rear.]