#2181 Issue closed
: In case of disk mapping disks in var/lib/rear/layout/config/df.txt are not mapped¶
Labels: enhancement
, bug
, fixed / solved / done
jsmeix opened issue at 2019-07-15 11:37:¶
-
ReaR version ("/usr/sbin/rear -V"):
current master code -
Description of the issue (ideally so that others can reproduce it):
On original system only /dev/vdb
was used,
on replacement hardware only /dev/vda
should be used
so during "rear recover" in rear config files (e.g. disklayout.conf)
/dev/vdb
is mapped to (i.e. replaced with) /dev/vda
but that causes in 420_autoresize_last_partitions.sh
+++ grep '^/dev/vda5 ' /var/lib/rear/layout/config/df.txt
+++ mathlib_calculate ' * 1048576'
+++ bc -ql
(standard_in) 1: syntax error
because in /var/lib/rear/layout/config/df.txt
/dev/vdb
is not mapped to (i.e. replaced with) /dev/vda
Filesystem 1048576-blocks Used Available Capacity Mounted on
/dev/vdb5 34295M 7403M 26762M 22% /
so
grep '^/dev/vda5 ' /var/lib/rear/layout/config/df.txt
finds nothing and that results an empty first argument
for the mathlib_calculate ' * 1048576'
call
which causes the syntax error
for bc
.
The syntax error
for bc
is not the actual problem.
The actual problem is that in 420_autoresize_last_partitions.sh
that code part cannot do its inteded job because it works on
inappropriate data in /var/lib/rear/layout/config/df.txt
jsmeix commented at 2019-07-17 13:32:¶
It seems the same kind of issue (disk mapping is not applied)
also happens for the contents of the variable
BTRFS_SUBVOLUME_SLES_SETUP
I have a mapping where /dev/vdb is mapped to /dev/vda
but I have in the recovery system in /etc/rear/rescue.conf
the old
BTRFS_SUBVOLUME_SLES_SETUP=( /dev/vdb5 )
so that the mapping should be also applied to /etc/rear/rescue.conf
jsmeix commented at 2019-07-18 09:15:¶
https://github.com/rear/rear/pull/2188/commits/465baddb521e5890d077fa72a4ddd3e8706a7627
in
https://github.com/rear/rear/pull/2188
avoids the above described mathlib_calculate/bc syntax error
(but that does not actually solve this issue here).
jsmeix commented at 2019-07-19 14:35:¶
With
https://github.com/rear/rear/pull/2190
merged
this issue should be fixed.
[Export of Github issue for rear/rear.]