#3487 PR merged
: In 150_wipe_disks.sh fix wrong 'device_to_be_wiped_size_byte' test¶
Labels: bug
, fixed / solved / done
jsmeix opened issue at 2025-07-02 11:51:¶
-
Type: Bug Fix
-
Impact: Low
-
Reference to related issue (URL):
https://github.com/rear/rear/pull/3484#issuecomment-3022670414 -
How was this pull request tested?
see below
https://github.com/rear/rear/pull/3487#issuecomment-3031144320 -
Description of the changes in this pull request:
In layout/recreate/default/150_wipe_disks.sh
fix wrong device_to_be_wiped_size_byte test, see
https://github.com/rear/rear/pull/3484#issuecomment-3022670414
jsmeix commented at 2025-07-03 07:13:¶
Tested it:
Original system:
# lsblk -ipo NAME,KNAME,PKNAME,TYPE,FSTYPE,SIZE,MOUNTPOINT /dev/vda
NAME KNAME PKNAME TYPE FSTYPE SIZE MOUNTP
/dev/vda /dev/vda disk 15G
|-/dev/vda1 /dev/vda1 /dev/vda part 8M
|-/dev/vda2 /dev/vda2 /dev/vda part crypto_LUKS 13G
| `-/dev/mapper/cr_root /dev/dm-0 /dev/vda2 crypt ext4 13G /
`-/dev/vda3 /dev/vda3 /dev/vda part crypto_LUKS 2G
`-/dev/mapper/cr_swap /dev/dm-1 /dev/vda3 crypt swap 2G [SWAP]
ReaR recovery system:
RESCUE localhost:~ # rear -D recover
...
Running 'layout/recreate' stage ======================
Disks to be completely overwritten and recreated by /var/lib/rear/layout/diskrestore.sh:
/dev/vda
Determining disks to be wiped ...
UserInput -I WIPE_DISKS_CONFIRMATION needed in /usr/share/rear/layout/recreate/default/120_confirm_wipedisk_disks.sh line 168
Disks to be wiped: /dev/vda
1) Confirm disks to be wiped and continue 'rear recover'
2) Skip wiping disks and continue 'rear recover'
3) Use Relax-and-Recover shell and return back to here
4) Abort 'rear recover'
(default '1' timeout 30 seconds)
UserInput: No real user input (empty or only spaces) - using default input
UserInput: Valid choice number result 'Confirm disks to be wiped and continue 'rear recover''
User confirmed disks to be wiped
Wiping child devices of /dev/vda in reverse ordering: /dev/vda3 /dev/vda2 /dev/vda1 /dev/vda
Wiped first 16777216 bytes of /dev/vda3
Wiped last 16777216 bytes of /dev/vda3
Wiped first 16777216 bytes of /dev/vda2
Wiped last 16777216 bytes of /dev/vda2
Wiped first 8388608 bytes of /dev/vda1
Skip wiping at the end of /dev/vda1 (dvice size 8388608 not greater than the bytes that were wiped)
Wiped first 16777216 bytes of /dev/vda
Wiped last 16777216 bytes of /dev/vda
Start system layout restoration.
...
jsmeix commented at 2025-07-03 07:15:¶
I think the fix in this pull request
is "sufficiently obvious" that it works so
@rear/contributors
I would like to merge it today afternoon
unless there are objections.
[Export of Github issue for rear/rear.]