[rear-users] Disk partition resizing?

Jeroen Hoekx jeroen.hoekx at hamok.be
Sun Jan 11 09:35:39 CET 2015


Hi Les,

On 9 January 2015 at 21:59, Les Mikesell <lesmikesell at gmail.com> wrote:
> I'm trying to use rear to convert a Centos5 system to a VM.  The
> source has 3 primary partitions on /dev/sda:
>
> Disk /dev/sda: 146684248063B
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
>
> Number  Start          End            Size           Type     File system  Flags
>  1      32256B         106928639B     106896384B     primary  ext3         boot
>  2      106928640B     142387822079B  142280893440B  primary  ext3
>  3      142387822080B  146681418239B  4293596160B    primary  linux-swap
>
> I've tried both smaller and larger target disks and the restore script
> claims that it is resizing the partitions to fit, but parted always
> claims that the value for the last partition is 'outside of the
> device'.   Actually, it only mentions resizing 2 partitions:
> Partition primary on /dev/sda: size reduced to fit on disk.
> Partition primary on /dev/sda: size reduced to fit on disk.
> (when in fact this target disk is actually bigger) - after failing I have:

Rear will not resize 'boot' partitions.

> Model: VMware Virtual disk (scsi)
> Disk /dev/sda: 157840048127B
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
>
> Number  Start       End            Size           Type     File system  Flags
>  1      32768B      106929151B     106896384B     primary               boot
>  2      106930176B  157840048127B  157733117952B  primary
>
> And the failing command is:
> parted -s /dev/sda mkpart '"primary"' 157840084992B 157840048127B >&2

This is very strange. It tries to create a partition with the start
after the end. The previous partition was already ending at the disk
end...

> What computes the adjusted sizes in the diskrestore.sh and are there
> known problems in the version packaged as rear-1.16.1-1.el5 in EPEL?

All the code is in
usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh

Do you have a ticket with a more complete log for this?

Greetings,

Jeroen


More information about the rear-users mailing list