Bug#323978: /etc/rcS.d/S25lvm should be renamed to S26lvm when upgrading from woody to sarge

Norbert Veber nveber at pyre.virge.net
Fri Aug 19 15:44:41 UTC 2005


Package: lvm-common
Version: 1.5.17
Severity: normal

Hi,

I have a machine which runs lvm logical volumes on top of a mirrored
raid set (mdadm).  While running woody there was no problem because I
was using a kernel with md support built in.  The kernel started md
devices by itself at boot time.  Later the lvm init script started the
lvm devices on top of the md device, and all was well.

After upgrading to sarge, and a 2.6 initrd kernel I ran into a problem
where the lvm init script was starting before the mdadm-raid init
script.  Since the physical volumes were mirrored, lvm grabs one of the
mirrors and starts the vg.  Then later mdadm tries to start the md, but
it's not able to because lvm is already using one of the drives.
Instead it starts in degraded mode, and the system ends up in quite a
mess.

In /etc/rcS.d my system had the following links:
 S25lvm -> ../init.d/lvm
 S25mdadm-raid -> ../init.d/mdadm-raid

Looking at lvm-common.postinst, the lvm init script is supposed to be
started at S26lvm (not S25).  However, the S25link was left there from
the woody lvm packages.  This is because update-rc.d doesn't touch the
links if they alerady exist (to preserve sysadmin customizations).
lvm-common.postinst:
update-rc.d lvm start 26 S . start 50 0 6 . > /dev/null

The postinst should include a check to see if S25lvm exists, and rename
it to S26lvm..

PS. Why is lvm started in runlevel 0 and 6?  I looked around
    /usr/share/doc but found no explanation.  It would make more sense
    if "stop" links were created.  Ie. K50lvm not S50lvm.

Thanks,

Norbert




More information about the pkg-lvm-maintainers mailing list