#2134 Issue closed: 420_autoresize_last_partitions.sh fails if a disk has no partition listed in disklayout.conf

Labels: bug, support / question, fixed / solved / done

geksi opened issue at 2019-05-03 12:15:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    2.4.3

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    Red Hat Enterprise Linux Server release 7.5

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    KVM

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    x86

  • Description of the issue (ideally so that others can reproduce it):
    Test case: restore to the larger/smaller hard disks than original

Description:
Last partition on /dev/sda is a LVM physical volume, so this partition is not present in /var/lib/rear/layout/config/df.txt

> [root@xxxxxxx ~]# fdisk -l /dev/sda
> 
> Disk /dev/sda: 53.7 GB, 53682896896 bytes
> 64 heads, 32 sectors/track, 51196 cylinders
> Units = cylinders of 2048 * 512 = 1048576 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x0004d54d
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           2         513      524288   83  Linux
> Partition 1 does not end on cylinder boundary.
> /dev/sda2             514        8705     8388608   82  Linux swap / Solaris
> Partition 2 does not end on cylinder boundary.
> **/dev/sda3            8706       51196    43510784   8e  Linux LVM**
> Partition 3 does not end on cylinder boundary.
>

> [root@xxxxxxx ~]# pvs
>   PV         VG         Fmt  Attr PSize  PFree
>   **/dev/sda3  volgroup1 lvm2 a--u 41.49g 27.37g**
>   /dev/sde   volgroup2  lvm2 a--u 59.99g     0

During recover rear tries to calculate last_part_disk_space_usage in 420_autoresize_last_partitions.sh using "df" information from /var/lib/rear/layout/config/df.txt

But since /dev/sda3 it's not a mounted partition the 420_autoresize_last_partitions.sh script runs on error:

> User confirmed disk mapping
> Examining /dev/sda to automatically resize its last active partition
> Checking /dev/sda1 if it is the last partition on /dev/sda
> Checking /dev/sda2 if it is the last partition on /dev/sda
> Checking /dev/sda3 if it is the last partition on /dev/sda
> Found 'primary' partition /dev/sda3 as last partition on /dev/sda
> Determining if last partition /dev/sda3 is resizeable
> Determining new size for last partition /dev/sda3
> Determining if last partition /dev/sda3 actually needs to be increased or shrinked
> New /dev/sda is 4194304 bigger than old disk
> Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)
> Examining /dev/sdb to automatically resize its last active partition
> ERROR: Failed to determine device node for last partition on /dev/sdb
> Aborting due to an error, check /var/log/rear/rear-xxxxxxx.log for details
> Exiting rear recover (PID 13539) and its descendant processes
> Running exit tasks
> You should also rm -Rf /tmp/rear.zvn7zLzPd3KR5bS
> Terminated
  • debugging:
> ++ DebugPrint 'Determining new size for last partition /dev/sda3'
> 
> ++ Debug 'Determining new size for last partition /dev/sda3'
> ++ test 1
> ++ Log 'Determining new size for last partition /dev/sda3'
> +++ date '+%Y-%m-%d %H:%M:%S.%N '
> ++ local 'timestamp=2019-05-03 12:10:31.535807053 '
> ++ test 1 -gt 0
> ++ echo '2019-05-03 12:10:31.535807053 Determining new size for last partition /dev/sda3'
> 2019-05-03 12:10:31.535807053 Determining new size for last partition /dev/sda3
> ++ test 1
> ++ Print 'Determining new size for last partition /dev/sda3'
> ++ test 1
> ++ echo -e 'Determining new size for last partition /dev/sda3'
> +++ mathlib_calculate '1024 * 1024'
> +++ bc -ql
> ++ MiB=1048576
> +++ mathlib_calculate '53687091200 / 1048576'
> +++ bc -ql
> ++ new_disk_size_MiB=51200
> +++ mathlib_calculate '51200 * 1048576'
> +++ bc -ql
> ++ new_disk_remainder_start=53687091200
> +++ mathlib_calculate '53687091200 - 9127854080'
> +++ bc -ql
> ++ new_last_part_size=44559237120
> ++ test 44559237120 -ge 1048576
> ++ new_extended_part_size=0
> ++ test logical = primary
> ++ last_part_disk_space_usage=($( grep "^$last_part_dev " "$original_disk_space_usage_file" ))
> +++ **grep '^/dev/sda3 ' /var/lib/rear/layout/config/df.txt**
> +++ **mathlib_calculate ' * 1048576'**
> +++ bc -ql
> **(standard_in) 1: syntax error**
> ++ **last_part_used_bytes=**
> ++ is_positive_integer
> ++ local argument=
> ++ test '' -gt 0
> ++ echo 0
> 0
> ++ return 1
> ++ is_positive_integer 0
> ++ local argument=0
> ++ test 0 -gt 0
> ++ echo 0
> 0
> ++ return 1
> ++ DebugPrint 'Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
> ++ Debug 'Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
> ++ test 1
> ++ Log 'Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
> +++ date '+%Y-%m-%d %H:%M:%S.%N '
> ++ local 'timestamp=2019-05-03 12:10:31.554398443 '
> ++ test 1 -gt 0
> ++ echo '2019-05-03 12:10:31.554398443 Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
> 2019-05-03 12:10:31.554398443 Determining if last partition /dev/sda3 actually needs to be increased or shrinked
> ++ test 1
++ Print 'Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
++ test 1
++ echo -e 'Determining if last partition /dev/sda3 actually needs to be increased or shrinked'
+++ mathlib_calculate '53687091200 - 53682896896'
+++ bc -ql
++ disk_size_difference=4194304
++ test 4194304 -gt 0
++ DebugPrint 'New /dev/sda is 4194304 bigger than old disk'
++ Debug 'New /dev/sda is 4194304 bigger than old disk'
++ test 1
++ Log 'New /dev/sda is 4194304 bigger than old disk'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2019-05-03 12:10:31.559652957 '
++ test 1 -gt 0
++ echo '2019-05-03 12:10:31.559652957 New /dev/sda is 4194304 bigger than old disk'
2019-05-03 12:10:31.559652957 New /dev/sda is 4194304 bigger than old disk
++ test 1
++ Print 'New /dev/sda is 4194304 bigger than old disk'
++ test 1
++ echo -e 'New /dev/sda is 4194304 bigger than old disk'
+++ mathlib_calculate '53682896896 / 100 * 10'
+++ bc -ql
++ increase_threshold_difference=5368289689
++ test 4194304 -lt 5368289689
++ is_true ''
++ case "$1" in
++ return 1
++ DebugPrint 'Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
++ Debug 'Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
++ test 1
++ Log 'Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2019-05-03 12:10:31.564920251 '
++ test 1 -gt 0
++ echo '2019-05-03 12:10:31.564920251 Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
2019-05-03 12:10:31.564920251 Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)
++ test 1
++ Print 'Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
++ test 1
++ echo -e 'Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)'
++ continue
++ read component_type disk_device old_disk_size junk
++ DebugPrint 'Examining /dev/sdb to automatically resize its last active partition'
++ Debug 'Examining /dev/sdb to automatically resize its last active partition'
++ test 1
++ Log 'Examining /dev/sdb to automatically resize its last active partition'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2019-05-03 12:10:31.567360601 '
++ test 1 -gt 0
++ echo '2019-05-03 12:10:31.567360601 Examining /dev/sdb to automatically resize its last active partition'
2019-05-03 12:10:31.567360601 Examining /dev/sdb to automatically resize its last active partition
++ test 1
++ Print 'Examining /dev/sdb to automatically resize its last active partition'
++ test 1
++ echo -e 'Examining /dev/sdb to automatically resize its last active partition'
+++ get_sysfs_name /dev/sdb
+++ local name=sdb
+++ name=sdb
+++ [[ -e /sys/block/sdb ]]
+++ echo sdb
+++ return 0
++ sysfsname=sdb
++ test sdb
++ test -d /sys/block/sdb
+++ get_disk_size sdb
+++ local disk_name=sdb
+++ has_binary blockdev
+++ for bin in '$@'
+++ type blockdev
+++ return 0
+++ blockdev --getsize64 /dev/sdb
+++ return
++ new_disk_size=64424509440
++ is_positive_integer 64424509440
++ local argument=64424509440
++ test 64424509440 -gt 0
++ echo 64424509440
64424509440
++ return 0
++ test 64424509440 -eq 64420315136
++ max_part_start=0
++ last_part_dev=
++ last_part_start=0
++ last_part_size=0
++ extended_part_dev=
++ extended_part_start=0
++ extended_part_size=0
++ read component_type disk_dev part_size part_start part_type part_flags part_dev junk
+++ grep '^part /dev/sdb' /var/lib/rear/layout/disklayout.conf
++ test ''
++ Error 'Failed to determine device node for last partition on /dev/sdb'
++ LogPrintError 'ERROR: Failed to determine device node for last partition on /dev/sdb'
++ Log 'ERROR: Failed to determine device node for last partition on /dev/sdb'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2019-05-03 12:10:31.575869871 '
++ test 1 -gt 0
++ echo '2019-05-03 12:10:31.575869871 ERROR: Failed to determine device node for last partition on /dev/sdb'
2019-05-03 12:10:31.575869871 ERROR: Failed to determine device node for last partition on /dev/sdb
++ PrintError 'ERROR: Failed to determine device node for last partition on /dev/sdb'
++ echo -e 'ERROR: Failed to determine device node for last partition on /dev/sdb'

RESCUE xxxxxxx:~ # cat /var/lib/rear/layout/config/df.txt
Filesystem                        1048576-blocks  Used Available Capacity Mounted on
/dev/mapper/xxxxxxx-root_lv             3904M 1138M     2751M      30% /
/dev/sda1                                   504M  175M      330M      35% /boot
/dev/mapper/xxxxxxx-home_lv              488M    5M      473M       1% /home
/dev/mapper/xxxxxxx-opt_lv               976M  563M      397M      59% /opt
/dev/mapper/xxxxxxx-yyyy_lv              108M    1M      105M       1% /usr/yyyy
/dev/mapper/volgroup1-zzz_lv              1960M    4M     1941M       1% /zzz
/dev/mapper/volgroup1-vvv_lv              3904M 1273M     2615M      33% /vvv
/dev/mapper/volgroup1-uuuuuu_lv           1952M  111M     1826M       6% /opt/uuuuuu
/dev/mapper/volgroup1-aaa_lv              1480M  650M      831M      44% /opt/hhhh/aaaa/cccc
/dev/mapper/volgroup2-v01          9952M   23M     9913M       1% /test/upp
/dev/mapper/volgroup2-v02         40190M   48M    40126M       1% /test/epp
/dev/mapper/volgroup5-v05         61403M 3105M    58298M       6% /vg04
/dev/mapper/volgroup3-v03         50250M 3124M    47110M       7% /vg02
/dev/mapper/volgroup4-v04         50250M   52M    50182M       1% /vg03


 fdisk -l

Disk /dev/sdb: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdd: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

jsmeix commented at 2019-05-03 13:28:

The current code that is related to AUTORESIZE_PARTITIONS
works only with "plain normal" harddisk partitions and not with LVM
or for any kind of autoresizing any kind of higer level storage objects.

@geksi
to get an easier overview what a partition is a part of lvm
means in your particular case please provide the full output of

lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT

In general see the section about

Resizing partitions in MIGRATION_MODE during "rear recover"

in usr/shar/rear/conf/default.conf e.g. online at
https://github.com/rear/rear/blob/master/usr/share/rear/conf/default.conf#L372
that reads in particular

In particular this does not resize volumes
on top of the affected partitions.
To migrate volumes on a disk where the disk size
had changed the user must in advance
manually adapt his disklayout.conf file
before he runs "rear recover".

jsmeix commented at 2019-05-03 13:42:

@geksi

as far as I see your new /dev/sda has 53.7 GB = 53687091200 bytes
and it is only 4194304 bytes = 4.0 MiB bigger than the old disk.

I wonder why you like to do any resizing here at all
only because of a 4 MiB bigger disk?

Why can't you leave that 4 MiB unused and
recreate things byte by byte exactly as it was before via

AUTORESIZE_PARTITIONS="false"

In general having a reasonable smaller part of unused disk space
at the end of the original system disk helps you to recreate your
system byte by byte exactly as it was before on a replacement disk
that can be even a bit smaller than the disk of the original system.

jsmeix commented at 2019-05-03 13:56:

The

Error 'Failed to determine device node for last partition on /dev/sdb'

has nothing to do with df or that
Last partition on /dev/sda is a LVM physical volume.

It errors out because

grep '^part /dev/sdb' /var/lib/rear/layout/disklayout.conf

results nothing.

@geksi
what is the whole content of your /var/lib/rear/layout/disklayout.conf file?

From my current point of view it seems you have a

disk /dev/sdb ...

entry in your /var/lib/rear/layout/disklayout.conf
but not a single matching

part /dev/sdb ...

entry.

I think layout/prepare/default/420_autoresize_last_partitions.sh
is perhaps not sufficiently prepared for that case
but I need to better understand when that case happens.

Currently I have AUTORESIZE_EXCLUDE_PARTITIONS
but it seems AUTORESIZE_EXCLUDE_DISKS is also needed
so that one can exclude whole disks (like /dev/sdb in this case)
from the autoresize functionality.

jsmeix commented at 2019-05-03 14:07:

@geksi
can you test if the

Error 'Failed to determine device node for last partition on /dev/sdb'

does no longer happen when you add this diff to your
usr/share/rear/layout/prepare/default/420_autoresize_last_partitions.sh

 while read component_type disk_device old_disk_size junk ; do
+    # Continue with next disk if the current one has no partitions
+    # i.e. when there are no 'part' entries in disklayout.conf for the current disk:
+    grep -q "^part $disk_device" "$LAYOUT_FILE" || continue
+
     DebugPrint "Examining $disk_device to automatically resize its last active partition"

(i.e. add the lines marked here with a leading '+' but without the '+')

jsmeix commented at 2019-05-03 14:37:

Regarding my
https://github.com/rear/rear/issues/2134#issuecomment-489099626

I wonder why you like to do any resizing here at all
only because of a 4 MiB bigger disk?

Carefully reading the messages helps to not wonder ;-)

In the initial description
https://github.com/rear/rear/issues/2134#issue-440019132
there is

Determining if last partition /dev/sda3 actually needs to be increased or shrinked
New /dev/sda is 4194304 bigger than old disk
Skip increasing last partition /dev/sda3 (new disk less than 10% bigger)

so no resizing at all happens for /dev/sda and all works there as intended:
On /dev/sda things get recreated byte by byte exactly as it was before
which would in particular keep LVM on /dev/sda working as before.

The only thing that happens here it that 420_autoresize_last_partitions.sh
fails at /dev/sdb because that one has no partition listed in disklayout.conf
and for this case
https://github.com/rear/rear/issues/2134#issuecomment-489107749
should help to avoid it.

jsmeix commented at 2019-05-03 14:54:

@geksi
a summary of what information I still need from you:

Please provide the full output of the command

lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT

and the whole content of your /var/lib/rear/layout/disklayout.conf file.

geksi commented at 2019-05-06 10:20:

@jsmeix
thank you for your reply!

RESCUE xxxxxx:~ # lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT
NAME     KNAME    PKNAME TRAN TYPE FSTYPE    SIZE MOUNTPOINT
/dev/sda /dev/sda             disk            55G
/dev/sdb /dev/sdb             disk            65G
/dev/sdc /dev/sdc             disk            55G
/dev/sdd /dev/sdd             disk            55G
/dev/sde /dev/sde             disk            65G
/dev/sr0 /dev/sr0        ata  rom  iso9660 367.3M

cat /var/lib/rear/layout/disklayout.conf
# Disk /dev/sda
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sda 53687091200 msdos
# Partitions on /dev/sda
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
part /dev/sda 536870912 1048576 primary boot /dev/sda1
part /dev/sda 8589934592 537919488 primary none /dev/sda2
part /dev/sda 44555042816 9127854080 primary lvm /dev/sda3
# Disk /dev/sdb
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sdb 64424509440 unknown
# Partitions on /dev/sdb
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Disk /dev/sdc
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sdc 53687091200 unknown
# Partitions on /dev/sdc
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Disk /dev/sdd
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sdd 53687091200 unknown
# Partitions on /dev/sdd
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Disk /dev/sde
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sde 64424509440 unknown
# Partitions on /dev/sde
# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>
# Format for LVM PVs
# lvmdev <volume_group> <device> [<uuid>] [<size(bytes)>]
lvmdev /dev/systemwwww /dev/sda3 Ls5E7u-XmK0-SuIN-4QOw-tYKP-qBhC-e3WBqu 87021568
lvmdev /dev/uuwwwwvg04 /dev/sdb Ygy0B4-acUd-YHJa-2H4d-OxTO-Flo2-1ct9vs 125829120
lvmdev /dev/uuwwwwvg02 /dev/sdc 20iGzE-K8mH-OQXT-JeeY-i5Nc-0f6B-6yODHF 104857600
lvmdev /dev/uuwwwwvg03 /dev/sdd pla3m5-A2Fg-i7Bm-cfzO-KXMg-iNkU-3bfhzp 104857600
lvmdev /dev/uuwwwwvg01 /dev/sde LV1oVV-m3hl-FYqo-Ay1K-8qkG-lsOs-ZyOpcU 125829120
# Format for LVM VGs
# lvmgrp <volume_group> <extentsize> [<size(extents)>] [<size(bytes)>]
lvmgrp /dev/systemwwww 4096 10622 43507712
lvmgrp /dev/uuwwwwvg04 4096 15359 62910464
lvmgrp /dev/uuwwwwvg02 4096 12799 52424704
lvmgrp /dev/uuwwwwvg03 4096 12799 52424704
lvmgrp /dev/uuwwwwvg01 4096 15359 62910464
# Format for LVM LVs
# lvmvol <volume_group> <name> <size(bytes)> <layout> [key:value ...]
lvmvol /dev/uuwwwwvg01 uuwwwwlv01 10737418240b linear
lvmvol /dev/uuwwwwvg01 uuwwwwlv02 42949672960b linear
lvmvol /dev/uuwwwwvg02 uuwwwwlv03 53678702592b linear
lvmvol /dev/uuwwwwvg03 uuwwwwlv04 53678702592b linear
lvmvol /dev/uuwwwwvg04 uuwwwwlv05 64416120832b linear
lvmvol /dev/systemwwww xxxx_lv 536870912b linear
lvmvol /dev/systemwwww aaaa_lv 134217728b linear
lvmvol /dev/systemwwww ooo_lv 1073741824b linear
lvmvol /dev/systemwwww root_lv 4294967296b linear
lvmvol /dev/systemwwww ssssss_lv 2147483648b linear
lvmvol /dev/systemwwww tmp_lv 2122317824b linear
lvmvol /dev/systemwwww ttt_lv 1610612736b linear
lvmvol /dev/systemwwww var_lv 4294967296b linear
# Filesystems (only ext2,ext3,ext4,vfat,xfs,reiserfs,btrfs are supported).
# Format: fs <device> <mountpoint> <fstype> [uuid=<uuid>] [label=<label>] [<attributes>]
fs /dev/mapper/uuwwwwvg01-uuwwwwlv01 /test/app ext4 uuid=581590de-ed32-4aa1-be04-b85e30c69667 label= blocksize=4096 reserved_blocks=0% max_mounts=28 check_interval=180d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/uuwwwwvg01-uuwwwwlv02 /test/bpp ext4 uuid=ae0d5a40-acb6-400b-aada-d4064966db6a label= blocksize=4096 reserved_blocks=0% max_mounts=36 check_interval=180d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/uuwwwwvg02-uuwwwwlv03 /vg02 ext4 uuid=02a4e6a5-624a-4799-a673-f181c929f3a9 label= blocksize=4096 reserved_blocks=0% max_mounts=22 check_interval=180d bytes_per_inode=16129 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/uuwwwwvg03-uuwwwwlv04 /vg03 ext4 uuid=ccf38ca8-6c97-43ac-ae50-b33a97c95f3d label= blocksize=4096 reserved_blocks=0% max_mounts=32 check_interval=180d bytes_per_inode=16129 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/uuwwwwvg04-uuwwwwlv05 /vg04 xfs uuid=a1a062f3-91c9-4d40-838a-0fcfab250cc6 label=  options=rw,relatime,attr2,inode64,noquota
fs /dev/mapper/systemwwww-xxxx_lv /home ext4 uuid=c20227f3-bcff-4f38-9933-79f180c7f277 label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-aaaa_lv /usr/aaaa ext4 uuid=ef31cbc9-8222-4868-86a0-b299da9663cf label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=4096 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-ooo_lv /ooo ext4 uuid=ed6c3494-d78d-448c-83ae-1ef2c0a1a01c label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-root_lv / ext4 uuid=07a1dd3e-d303-4990-8b05-a3b5599175eb label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-ssssss_lv /opt/ssssss ext4 uuid=115b76c4-cdcb-472a-96a5-ff864e90949a label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-tmp_lv /tmp ext4 uuid=c6e7c351-e1f3-4f6a-b988-152fefcf92ca label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16192 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-ttt_lv /opt/ttt/ddd/ttt ext3 uuid=0a8f53d8-9505-4ad2-91d1-89d65c06f542 label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/mapper/systemwwww-var_lv /var ext4 uuid=e5bf27ab-0018-496f-a312-0c7758fd36c5 label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered
fs /dev/sda1 /boot ext2 uuid=09dabb36-e336-476c-95ed-5a486d923614 label=boot blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime
# Swap partitions or swap files
# Format: swap <filename> uuid=<uuid> label=<label>
swap /dev/sda2 uuid=d5eb0092-a5d5-4080-98aa-d20f2d9cc001 label=swap

geksi commented at 2019-05-06 10:20:

@geksi
can you test if the

Error 'Failed to determine device node for last partition on /dev/sdb'

does no longer happen when you add this diff to your
usr/share/rear/layout/prepare/default/420_autoresize_last_partitions.sh

 while read component_type disk_device old_disk_size junk ; do
+    # Continue with next disk if the current one has no partitions
+    # i.e. when there are no 'part' entries in disklayout.conf for the current disk:
+    grep -q "^part $disk_device" "$LAYOUT_FILE" || continue
+
     DebugPrint "Examining $disk_device to automatically resize its last active partition"

(i.e. add the lines marked here with a leading '+' but without the '+')

works without errors

jsmeix commented at 2019-05-06 11:27:

@geksi
thank you for your issue report and your prompt reply.

I fixed it for ReaR 2.5 via
https://github.com/rear/rear/commit/9710d8b28293009665dad558eb67468b1cf2ac2e

jsmeix commented at 2019-05-06 11:31:

@geksi
can you provide me the output of the command

lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT

on your original system (not from within the ReaR recovery system)
because I would like to see how your disk layout looks originally.

geksi commented at 2019-05-06 11:49:

NAME                                 KNAME      PKNAME    TRAN TYPE FSTYPE        SIZE MOUNTPOINT
/dev/sda                             /dev/sda                  disk                55G
|-/dev/sda1                          /dev/sda1  /dev/sda       part ext2          512M /boot
|-/dev/sda2                          /dev/sda2  /dev/sda       part swap            8G [SWAP]
`-/dev/sda3                          /dev/sda3  /dev/sda       part LVM2_member  41.5G
  |-/dev/mapper/systemwwww-root_lv   /dev/dm-0  /dev/sda3      lvm  ext4            4G /
  |-/dev/mapper/systemwwww-home_lv   /dev/dm-5  /dev/sda3      lvm  ext4          512M /home
  |-/dev/mapper/systemwwww-aaaa_lv   /dev/dm-7  /dev/sda3      lvm  ext4          128M /usr/aaaa
  |-/dev/mapper/systemwwww-ooo_lv    /dev/dm-8  /dev/sda3      lvm  ext4            1G /ooo
  |-/dev/mapper/systemwwww-ssssss_lv /dev/dm-9  /dev/sda3      lvm  ext4            2G /opt/ssssss
  |-/dev/mapper/systemwwww-tmp_lv    /dev/dm-10 /dev/sda3      lvm  ext4            2G /tmp
  |-/dev/mapper/systemwwww-ttt_lv    /dev/dm-11 /dev/sda3      lvm  ext3          1.5G /opt/ttt/ddd/ttt
  `-/dev/mapper/systemwwww-var_lv    /dev/dm-12 /dev/sda3      lvm  ext4            4G /var
/dev/sdb                             /dev/sdb                  disk LVM2_member    65G
`-/dev/mapper/uuwwwwvg04-uuwwwwlv05  /dev/dm-3  /dev/sdb       lvm  xfs            60G /vg04
/dev/sdc                             /dev/sdc                  disk LVM2_member    55G
`-/dev/mapper/uuwwwwvg02-uuwwwwlv03  /dev/dm-1  /dev/sdc       lvm  ext4           50G /vg02
/dev/sdd                             /dev/sdd                  disk LVM2_member    55G
`-/dev/mapper/uuwwwwvg03-uuwwwwlv04  /dev/dm-2  /dev/sdd       lvm  ext4           50G /vg03
/dev/sde                             /dev/sde                  disk LVM2_member    65G
|-/dev/mapper/uuwwwwvg01-uuwwwwlv01  /dev/dm-4  /dev/sde       lvm  ext4           10G /test/app
`-/dev/mapper/uuwwwwvg01-uuwwwwlv02  /dev/dm-6  /dev/sde       lvm  ext4           40G /test/bpp
/dev/sr0                             /dev/sr0             ata  rom  iso9660     367.3M

jsmeix commented at 2019-05-06 12:13:

@geksi
thank you


[Export of Github issue for rear/rear.]