[Rear-users] New feature: savelayout and checklayout
gratien.dhaese at it3.be
Thu Dec 16 20:04:00 CET 2010
A very interesting discussion indeed.
On 16 Dec 2010, at 15:51, Jeroen Hoekx wrote:
> Thanks for accepting the patch.
> On 16 December 2010 13:10, Schlomo Schapiro <schlomo at schapiro.org> wrote:
>> Maybe in the future we can merge these two areas so that the checklayout
>> relies on the data in the recovery area, thus making extra savelayout
>> runs unnecessary.
> I'd rather see it happen the other way around :-)
> This happened last week:
> - Dag fixes bug SF#3132182 wrt Smart Array controllers
> - The next rescue system is our first one to include working hpacucli code
> - The smart array controller recreates the arrays
> - The restore fails because reported disk sizes in the new system are
> different from those taken just a few minutes earlier (smaller,
> presumably, the controller is smart about bad blocks?)
> This happened on a test system, so I could just adjust the size of the
> disks in what was saved. If it was a real system, also partitions and
> LVM would have to be hand edited in quite a few files to get your
> proper system on-line again.
> I think it's critical to have more control about the disk layout
> during the restore phase.
As long as the resizing is done somehow quiet.
What do I mean?
A bit of history: mkCDrec has this resizing feature since 2002 if
I'm not mistaken (but was never 100% satisfied with the solution).
As long as we stay in certain margin's the resizing of the partitions
should be done. This will/might jeopardize the vgcfgrestore step.
But, be careful with Windows partitions - do not resize these as these
stop working (albeit a nice opportunity to get rid of M$).
Swap partitions should not be shrinked, increasing may be done, but
not too much.
Noticed that you use a lot sfdisk, but ia64 does not support sfdisk.
parted is by my knowledge the only that is supported across all
> I've used Mondo before and automatic restores also failed due to
> different disk layouts and Mondo resizing the system. The provided
> interface couldn't resolve the problem. Instead we just had to edit
> one file (i-want-my-lvm) to fix it and then the restore worked fine.
Oh well, what can I say about Mondo? I asked Bruno way back in 2006
to participate with rear and fade out Mondo as I did with mkCDrec, but
he invested too much time into it to abandon it he said.
A missed opportunity, but it was his choice and we appreciated his
> The current setup is great when you want to restore to the same
> system, but as soon as it's any different things fall apart pretty
That was true, but 1.9.0 is going fast in the right direction ;-) to
However, I think it would be nice to draw a line somehow under
1.9.0 and prep it for a release. 6 months is long enough, isn't it?
> I wanted to fix it a few months ago and implemented resizing the Mondo
> way in ReaR. It worked, but I abandoned it because it was just a stop
> gap approach, people thought it wasn't necessary and I had other work
> to do.
> Later, when I had to write the savelayout code, I thought about
> reusing the already generated files, but that would have been more
> complex than just writing a few lines of new code to list the layout
> in one place. With the resizing thing in mind, I've tried to make sure
> that any information needed to restore a system is (or could) be
> included in this layout output.
> This week, I hadn't got much else to do and so I've started working on
> it. It's not quite finished yet, but apart from file system
> attributes, it can already restore a system. If it detects the system
> is identical, no user interaction is necessary (apart from DRBD
> primary/secondary :-), otherwise it prompts to check the layout file,
> creates a dependency list and generates code to restore the layout. A
> final prompt asks the user to confirm this file.
Must say I don't know DRDB to well, will put it on my todo learning curve.
> I know It's a major change, but perhaps you're interested in it and
> see a way to move things further.
> For code: https://code.launchpad.net/~jeroen-hoekx/+junk/rear-layout
Thanks for sharing your code.
More information about the rear-users