[rear-users] Change partition sizes

Johannes Meixner jsmeix at suse.de
Mon Nov 6 13:47:36 CET 2017


On Oct 31 14:01 Peter Jansen wrote (excerpt):
> I wonder if it is possible to change the Partition Sizes
> during a REAR Recovery Session.

In general migrating a system onto different hardware
does not "just work".

In sufficiently simple cases it may "just work" but in general
do not expect too much built-in intelligence from a program
(written in plain bash which is not a programming language
  that is primarily meant for artificial intelligence ;-)
that would do the annoying legwork for you.

For an example you may have a look at the
"P2V HP microserver to VmWare" issue

But migrating a system onto same hardware only with changed
partition sizes should be more or less straightforward.

> I see a number of files in /var/lib/rear/layout;
> e.g. disklayout.conf
> Is it sufficient to edit this file?

Is it sufficient to edit disklayout.conf
before you run "rear recover".

It could be laborious and unhandy to manually edit
disklayout.conf within the ReaR rescue/recovery system.
In this case have a look at RECOVERY_UPDATE_URL
in usr/share/rear/conf/default.conf

For an example how RECOVERY_UPDATE_URL works see

When you use the ReaR master code as 'git clone/checkout' see
what is special about the disklayout.conf file location
in the ReaR rescue/recovery system that you must consider

> What is the syntax of the lines in disklayout.conf?

I only found time to add comments about the format/syntax
for some basic entries like (each entry is on one single
line which could be shown wrapped here):
# Disk /dev/sda
# Format: disk <devname> <size(bytes)> <partition label type>

# Partitions on /dev/sda
# Format: part <device> <partition size(bytes)> <partition start(bytes)> 
<partition type|name> <flags> /dev/<partition>

# Filesystems (only ext2,ext3,ext4,vfat,xfs,reiserfs,btrfs are supported).
# Format: fs <device> <mountpoint> <fstype> [uuid=<uuid>] [label=<label>] 

# Swap partitions or swap files
# Format: swap <filename> uuid=<uuid> label=<label>

For more advanced entries without a format comment
you need to inspect the individual ReaR scripts
what values get written into disklayout.conf

In general regarding "First steps with Relax-and-Recover" see

Kind Regards
Johannes Meixner
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)

More information about the rear-users mailing list