[TriLUG] LVM InitRAMfs

Brian McCullough bdmc at bdmcc-us.com
Mon May 7 07:49:43 EDT 2012


On Thu, May 03, 2012 at 12:45:00PM -0400, Brian McCullough wrote:
> On Thu, May 03, 2012 at 12:39:29PM -0400, Seva Adari wrote:
> > Hi Brian,
> > 
> > I have not tried lvm on Debian, but last time I did an lvm install on
> > Ubuntu, it was tricky. I could n't install it directly from the install CD.
> > I don't know how different Debian is from Ubuntu, but following is
> > what I did on Ubuntu.
> 
> Fortunately, things are MUCH BETTER now.
> 
> I'll write more later, but have to run now.

OK, time for a longer explanation.


Most major ( Ubuntu, Debian, Fedora, others ) distributions either offer
or default to LVM these days.

That's why I found it odd that after completing the Debian installation,
with LVM, successfully, I had so much trouble after changing kernels.

What I read, and from my experience with that machine, there is a, I
guess you would say, race condition between DM ( the device mapper that
ultimately provides the bottom layer below LVM and several other tools )
and UDEV.

As I think I said earlier, I found a script, LVM2, in
/usr/share/initramfs-tools, which seemed to need to be placed in
"local-preload" or "local-top" ( I forget which ) in
/etc/initramfs-tools/scripts.  However, it was completely useless in
that spot and so I moved it to init-preload, where it seems to ( almost
) work.

I also went through the patches mentioned by someone else and applied
them, and finally was able to boot the system. ( only one patch applied
to the init scripts, the others applied to /etc/init.d/lvm2 )

The apparent race condition appears during the boot, when the system
starts emitting "No devices found" messages ( a couple of dozen or more,
depending on the phase of the moon ), before finally being able to find
the Volume Groups and then Logical Volumes needed to boot the system.


So, although I was finally successful, it is still not what I would call
completely satisfactory.



Thank you to all,
Brian




More information about the TriLUG mailing list