Bug#384821: Should predepend on lvm-common

Adam Majer adamm at zombino.com
Sun Aug 27 16:07:55 UTC 2006


Bastian Blank wrote:
> On Sat, Aug 26, 2006 at 07:30:06PM -0500, Adam Majer wrote:
>   
>> lvm2 preinst script is using files from lvm-common. Policy states,
>>  Pre-Depends are also required if the preinst script depends on the
>>  named package. It is best to avoid this situation if possible.
>>     
>
> It only requires it, if it fails without or does other nasty things.
> This is not the case, it is only a warning that some data may be not
> longer accessible under some conditions.
>   
OK. But this check fails if lvm-common is not installed even if it would
pass when lvm-common is finally installed. Otherwise you would have [ -x
/sbin/lvmiopversion ] before you actually call the utility.


>> I'm not a LVM expert (just installing it now :), so I'm not sure if
>> this bug can cause silent data loss for some if they don't have
>> lvm-common installed at all, but have lvm1 data.
>>     
>
> No. The data is not removed, only inaccessible.
>
>   
>> Preparing to replace lvm2 2.02.06-2 (using lvm2_2.02.06-2_i386.deb) ...
>>     
>
> Err, you have lvm2 configured,
>
>   
>> /var/lib/dpkg/tmp.ci/preinst: line 1: /sbin/lvmiopversion: No such file or directory
>> /var/lib/dpkg/tmp.ci/preinst: line 15: [: : integer expression expected
>> Unpacking replacement lvm2 ...
>> Selecting previously deselected package lvm-common.
>> Unpacking lvm-common (from lvm-common_1.5.20_i386.deb) ...
>>     
>
> without lvm-common?
>
>   

Yes :) But I can also get this if I do not have lvm2 at all. But this
weird dependency problem was caused when I was compiling most of the
dependencies for Sarge from Sid so I can use LVM2 under Sarge with
2.6.17. For some reason I could not start a given logical volume. Some
syscall always failed. So I upgraded udev, lvm2 and all the related
stuff (recompiled, removing some useless things for me like selinux),
and it still failed just with a shorter message.

The problem may have been related to vserver, not lvm2! Apparently when
I had any vserver running, I could not enable a logical volume. Other
utilities said something like FS already mounted, but it was not. Not in
any vserver or otherwise. When I stopped all vservers, lvm worked perfectly.

I'm not sure if 2.6.17 is compatible with lvm2 from Sarge (probably) as
I upgraded everything related to Sid's versions before I realized
vserver was the problem.

Anyway, this is the short story why at that point in time dependencies
may have been messed up, but still, the problem with the preinst is real.


- Adam





More information about the pkg-lvm-maintainers mailing list