[rear-users] Disk partition resizing?

Les Mikesell lesmikesell at gmail.com
Fri Jan 9 21:59:34 CET 2015


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:

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

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?

-- 
    Les Mikesell
     lesmikesell at gmail.com


More information about the rear-users mailing list