[rear-devel] [rear/rear] f5ef90: Update 10_include_partition_code.sh

Gratien D'haese gratien.dhaese at gmail.com
Tue Oct 21 13:37:20 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/rear/rear
  Commit: f5ef907e7cc54f2cfe486bf98479fd3649420d4f
      https://github.com/rear/rear/commit/f5ef907e7cc54f2cfe486bf98479fd3649420d4f
  Author: gsbit <guido.scheidegger at bit.admin.ch>
  Date:   2014-10-21 (Tue, 21 Oct 2014)

  Changed paths:
    M usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh

  Log Message:
  -----------
  Update 10_include_partition_code.sh

While recover a system to a smaller disk, we get the following error message:

------------------------------------------------
# rear recover
....
Device sda has size 53687091200, 146778685440 expected
Switching to manual disk layout configuration.
Original disk /dev/sda does not exist in the target system. Please choose an appropriate replacement.
1) /dev/sda            6) /dev/sdf          11) /dev/sdk
2) /dev/sdb            7) /dev/sdg          12) /dev/sdl
3) /dev/sdc            8) /dev/sdh          13) /dev/sdm
4) /dev/sdd            9) /dev/sdi          14) /dev/sdn
5) /dev/sde           10) /dev/sdj          15) Do not map disk.
#? 7
2014-10-14 11:02:07 Disk /dev/sdg chosen as replacement for /dev/sda.
Disk /dev/sdg chosen as replacement for /dev/sda.
This is the disk mapping table:
    /dev/sda /dev/sdg
Please confirm that '/var/lib/rear/layout/disklayout.conf' is as you expect.

1) View disk layout (disklayout.conf)  4) Go to Relax-and-Recover shell
2) Edit disk layout (disklayout.conf)  5) Continue recovery
3) View original disk space usage      6) Abort Relax-and-Recover
#? 5
Partition logical on /dev/sdg: size reduced to fit on disk.
Please confirm that '/var/lib/rear/layout/diskrestore.sh' is as you expect.

1) View restore script (diskrestore.sh)
2) Edit restore script (diskrestore.sh)
3) View original disk space usage
4) Go to Relax-and-Recover shell
5) Continue recovery
6) Abort Relax-and-Recover
#? 5
Start system layout restoration.
Creating partitions for disk /dev/sdg (msdos)
An error occurred during layout recreation.

1) View Relax-and-Recover log
2) View original disk space usage
3) Go to Relax-and-Recover shell
4) Edit restore script (diskrestore.sh)
5) Continue restore script
6) Abort Relax-and-Recover
#? 1

....
2014-10-14 11:02:07 Resized partition /dev/sdg5 from 4301520896B to 2901097224B.
2014-10-14 11:02:07 Resized partition /dev/sdg6 from 2154823680B to 1453288999B.
2014-10-14 11:02:07 Resized partition /dev/sdg7 from 4301520896B to 2901097224B.
2014-10-14 11:02:07 Resized partition /dev/sdg8 from 84448641024B to 56955138428B.
....
+++ parted -s /dev/sdg mkpart '"logical"' 47517990912B 50419088135B
Error: You requested a partition from 47.5GB to 50.4GB.
The closest location we can manage is 47.5GB to 50.4GB.
2014-10-14 11:02:29 An error occurred during layout recreation.
------------------------------------------------

We tried then to create the partition by hand with unit B

# parted -s /dev/sdg unit B mkpart '"logical"' 47517990912B 50419088135B
Error: You requested a partition from 47517990912B to 50419087872B.
The closest location we can manage is 47517991424B to 50419087872B.

# echo '47517991424 - 47517990912' | bc
512

As you can see, parted needs 512B empty space before the partition start point.


  Commit: 28dc82227e09d5fb02de62e9faac70a64694d68e
      https://github.com/rear/rear/commit/28dc82227e09d5fb02de62e9faac70a64694d68e
  Author: Gratien D'haese <gratien.dhaese at gmail.com>
  Date:   2014-10-21 (Tue, 21 Oct 2014)

  Changed paths:
    M usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh

  Log Message:
  -----------
  Merge pull request #487 from gsbit/partition_rebuild

Update 10_include_partition_code.sh


Compare: https://github.com/rear/rear/compare/8ab691a4b08b...28dc82227e09


More information about the rear-devel mailing list