Has anybody had good luck using FAI where it repartitions on a system that previously contained an lvm setup?

Thomas Neumann (FAI) blacky+fai at fluffbunny.de
Tue Jul 16 09:50:02 CEST 2013


On Monday 15 July 2013 23:33:55 you wrote:
[...]
> Good deal there.  Congrats on it... do you actually have any test cases
> with lvm and preserve?  If not, what are others doing?

I got some testcases where I was asked not to publish them. One of them may 
use lvm+preserve but I don't know from the top of my head.

Can you provide a working example?

https://github.com/ThomasNeumann/Public/tree/master/fai-setup-
storage/t/21_simple/

Has a couple of preserve tests. You need a '<diskconfig>.preformat' file 
which prepares the disk config and a '<diskconfig>' file which does the 
actual preserving. I suggest generating a couple of tests from the actual 
'preserve'-config:

 - on an empty device
 - with <diskconfig>.preserve equal to <diskconfig>
 - with <diskconfig>.preserve different to <diskconfig> (preserveable)
 - with <diskconfig>.preserve different to <diskconfig> (non preserveable)

(move the last one to 91_intentionally_broken/)

Afterwards you need to execute run-tests at least 2 times - the first time 
captures the current results as reference, each execution after that 
compares the stored result with the current result and notifies you if 
something has changed. 

[I intentionally didn't include any test results because one can use either
 real devices or faked tmpfs-devices. The results would change depending on
 what devices are available and their actual capacity.]

> [...] That said, I was a bit surprised to find out that
> even when a partition is preserved, the entire partition table is blown
> away anyway and then rebuilt with the preserved partition using the same
> boundaries.  Scarily enough this means if the install crashes at a
> certain point, the preserved partition will effectively have
> disappeared. (Obviously erasing and re-writing the partition table
> requires having all vg's disabled, making my original assertion wrong)

That surprised me too, but since I don't use preserve at all I haven't given 
much thought to the implications. Especially what is happening when 
preserving LVM devices. (Is it possible to trick setup-storage into 
shrinking the underlying PV but 'preserving' a LV? This can lead to very 
'interesting' results.)
 
> Anyway, I'd be glad to hear if I'm wrong/out of line, with these
> suggestions/questions.

I'd like to see an improvement on that front. I assume Thomas L. isn't happy 
about the current regression either.

bye
thomas


More information about the linux-fai mailing list