[Rear-users] Restoring to different disk layouts
jeroen.hoekx at hamok.be
Tue Sep 28 14:55:21 CEST 2010
Sorry for the partial mail, tabbed to send :-)
We have done several backup and restore tests of real(tm) systems
using our OBDR code. One issue that we have faced is the disk layout
of the target system that's different from the source system. ReaR
works well when the same number of disks is present, of at least the
same size and found in the same order. It won't use larger disks to
their fullest extend, but it works good enough to test.
We have code to resize partitions and logical volumes to smaller and
larger disks. Some advanced features such as reconfiguration of LVM
mirrors are lost, since we had to get rid of vgcfgrestore, but it's
unlikely to cause a lot of problems in the real world at this stage.
Where things start to get complicated is when changes are even
slightly more complex.
[/dev/sda 5G] -> [/dev/sda 10G]
[/dev/sdb 10G] [/dev/sdb 5G]
Obviously, this should work, but it doesn't because ReaR maps /dev/sda
to /dev/sda, but fails to restore because it can't find a suitable
disk for /dev/sdb.
We would like to discuss this here first, because it's a complicated
issue. Our current idea is to have automatic restores if the disk
layout permits it and complete user-driven restore otherwise.
Currently it's half automatic, half user-driven.
In any case, we would have to rewrite code to be much smarter than it
is now, so it can tell before partitioning starts that the current
setup will fail. We need to decide what's more important: mountpoints,
logical volumes, volume groups, RAID or partitions and what takes
preference in which case one of the underlying items is not present.
I think it's safe to say that we should start at mountpoints, that
every filesystem on the source system maps to a filesystem on the
target system. Logical volumes are not usually a problem to create.
Volume group changes are harder, since they would need an update in
/etc/fstab (manual by user?)
RAID arrays are only a problem when a different number of disks is
present, but this is not unsurmountable.
Partitions are also not that hard to do, but could also require
Do you have ideas about how to present this to the user? We can
implement things as far as needed for our environment, so I'm not sure
we can implemented everything...
More information about the rear-users