Not all fixed. Re: Has anybody had good luck using FAI where it repartitions on a system that previously contained an lvm setup?

Ken Hahn khahn at
Tue Jul 23 21:17:12 CEST 2013


Finishing up with what I've done to get preserve partition and LVM
working with FAI, I've found the following (in case anybody else needs

4.0.6 setup-storage has significant issues with lvm.  Even after fixing
the problem with liblinux-lvm-perl, setup-storage has problems with wipefs.

In my case I error out with:
Executing: wipefs -a vg/fscache
wipefs: error: vg/fscache: probing initialization failed

I don't see how that code every could have worked because I don't think
that $vg/$lv could ever be a valid path for the wipefs command.  This is
clearly what the code is trying to do.  Was this ever tested?

What I have done is to use fai-setup-storage_3.4.8 instead of the one
included with 4.0.6.

I had to make a few tweeks (I'd do some patches, but it's easier for me
to just cut and paste my notes):

1. find set_disk_info in /usr/lib/fai/subroutines
   change disklist to the following
    disklist=$(disk-info | sort )

2. Edit /usr/share/perl5/Linux/
    Search for LV Name replace with LV Path.
        # Parse the logical volume name.
        elsif( m/LV Path\s+(\S+)/ ) {

3. Put "use Storable qw(dclone);"
    under "use Parse::RecDescent;"
    and remove other occurrences.
(fix documented here:

(4. I Changed to the modern latest stable kernel)

This is a kludge, it won't fix the general case (but I'm  just
installing wheezy anyway).

Going forward I'd recommend:
1. liblinux-lvm-perl be changed to pass the new LV Path field.
2. downgrade fai-setup-storage back to a known working version (3.4.8?)
3. fix the logic in fai-setup-storage to deal with the multiple fields
for the LV in the manner described by Thomas.

At this point, I've managed to get installing wheezy with preserved lvm
partition working, which is what my work itch is. As a result, I'm
afraid I can't allocate much more time to trying to actively fix things.

If anybody takes it on, I'd be glad to try and help.

-Ken Hahn

On 07/22/2013 10:58 AM, Ken Hahn wrote:
> Hello,
> I'm worried I'm echoing in my own thread here, but here is what I've found:
> setup-storage depends on liblinux-lvm-perl
> While that library has been redone, both versions of it just seems to
> pass through the same problem.  The ultimate problem is that logical
> volume information is derived from executing the "vgdisplay -v" command.
> The output from this command has changed between squeeze and wheezy.
> The older version of this command has fewer fields.
> snippet of older output:
>   LV Name                /dev/vg/var
>   VG Name                vg
> snippit of newer output:
>   LV Path                /dev/vg/var
>   LV Name                var
>   VG Name                vg
> They've added a field, and changed what is contained in the old named field.
> I'm not sure if this is a change in the lvm tools or a change in the
> kernel interface, but it sure as heck messes with setup-storage.
> I'll go send a bug to the liblinux-lvm-perl debian package, but
> ultimately, I bet they just pass along another field as a fix.
> Anyway, apparently, this bug has legs.
> -Ken
> On 07/19/2013 05:14 PM, Ken Hahn wrote:
>> Hey,
>> Still looking at this issue (been gone to a conference), but I'm noting
>> that FAI/debian changed from using liblinux-lvm-perl .14-2 to .16-1.
>> This ends up changing what the "current device tree" looks like.
>> Specifically it appears the lv's are represented by /dev/ paths in the
>> old version and by volume name only in the new version.  This is really
>> significant because the post and pre depend on everything being a dev name.
>> Old method:
>>           'VG_vg' => [
>>                        '/dev/vg/fscache',
>>                        '/dev/vg/local.hd',
>>                        '/dev/vg/root',
>>                        '/dev/vg/swap',
>>                        '/dev/vg/var'
>>                      ]
>> New method:
>>           'VG_vg' => [
>>                        'fscache',
>>                        'local.hd',
>>                        'root',
>>                        'swap',
>>                        'var'
>>                      ]
>> (I discovered this while trying to use the old setup-storage in a new fai.)
>> Also, note this info in the  Linux::LVM changelog:
>> 0.14  Wed Jul  2 02:54:14 CDT 2008
>>         - Fixed some logic errors to get it working a little better
>>         - Full rewrite underway
>> I guess one of my questions is: is this a bug in setup-storage, or a bug
>> in Linux::LVM or perhaps even one of the lvm command line tools?
>> Also, how long have people be trying to give patches for setup-storage
>> because of a difference that really arose in Linux::LVM?
>> If anybody has any info on this before I keep digging on Monday, it
>> would be appreciated!
>> -Ken Hahn

More information about the linux-fai mailing list