On 10/11/13 11:36, auxsvr wrote:
Hello,
Has anyone tested LVM with dracut? In my case, the initrd produced by dracut in host-only mode, which is the default, does not include LVM support at all,
So far, I have been unable to ever generate a bootable initrd with Dracut, using LVM & dm-crypt, so that is definitely a problem!
which I found out the hard way and took many hours to recover from, by manually adjusting the initrd on another computer and improvising when it aborted during boot. The initrd created in no- hostonly mode does include LVM support, although it still cannot find the LVM root, because the device mapper becomes confused, dm-linear throws error messages:
dm-linear: Device lookup failed ioctl: error adding target to table
and I must run:
dmsetup remove_all
before lvm vgchange -ay, otherwise the disks are treated as separate volumes. In short, automatic boot with an LVM root is impossible at the moment.
This is on latest factory, dracut-034-3.1, device-mapper-1.02.78-0.15.3, lvm2-2.02.98-0.31.1.
Regards, Peter
On a somewhat related note, though, next time you run into problems with the initrd: Just start the computer and load a live-cd, then do the following: vgscan vgchange -ay <name> Then mount the root partition (mount <path> /mnt, for example). Afterwards, mount your boot partition (mount /dev/sdX /mnt/boot), then mount /sys, /proc and /dev via 'mount -o bind /mnt/<target>' (accordingly), simply chroot into the mounted root directory (chroot /mnt/ in this case), run mkinitrd, let it finish, and then you can simply restart your computer, since the live-cd should handle all unmounting (or just unmount everything by hand). Takes about 5 minutes to get back to a working, bootable system, since you use the chroot'ed root partition which works just like running the actual system, which means no external trial and error is required! -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org