Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#3701 - Must include DM modules in initrd when using LVM, even if you don't boot off of an LVM volume

Attached to Project: Arch Linux
Opened by David Rosenstrauch (darose) - Wednesday, 04 January 2006, 02:16 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It seems that even if your root and/or boot partitions are not on an LVM volume, but you later use LVM for other partitions (e.g., /home) mounting these will fail if you've customized your initrd to remove device manager modules.

This seems odd, since you really don't need to have the DM modules in the initrd in order to boot, and should just be able to load them later, when you load all your other modules. However, Arch's boot process activates LVM *before* loading the modules in rc.conf, which forces you to include the DM modules in your initrd or else you won't be able to have your LVM partitions get properly mounted at boot time.

Please change Arch's boot order so that the modules in rc.conf get loaded before activating LVM.
This task depends upon

Closed by  James Rayner (iphitus)
Sunday, 15 October 2006, 08:48 GMT
Reason for closing:  Won't fix
Additional comments about closing:  mkinitrd is deprecated.

as for autoloading the module, I dont think that's needed, MODULES=() line is fine.
Comment by Thomas Bächler (brain0) - Monday, 31 July 2006, 13:56 GMT
This has been fixed months ago, the modules are now loaded in the beginning of the boot process, should be closed.
Comment by David Rosenstrauch (darose) - Monday, 31 July 2006, 15:08 GMT
I don't think this has been fixed. I've seen this even with the new mkinitcpio.

If *any* of the volumes you have listed in /etc/fstab are LVM volumes, and you don't include "lvm2" when building the image, your system will fail to mount those volumes and so not boot correctly.

I would think, though, that the behavior should be that as long as your root (/) and /boot volumes are not on lvm that the system should be able to boot correctly. However, that would imply this sequence of events:

* boot kernel and initrd image
* load modules from rc.conf
* mount volumes from /etc/fstab
* proceed with rest of boot process

Perhaps this sequence doesn't make sense for some reason, making this impossible, and if so, that's fine. However the net effect of the current situation is that you must include lvm modules in your initrd if any of the file systems in your /etc/fstab are LVM - not just your root and boot partitions.
Comment by Thomas Bächler (brain0) - Monday, 31 July 2006, 15:24 GMT
This is not even related to initramfs/initrd stuff. Just add dm-mod to your MODULES array in rc.conf and you are fine. The only thing that could be fixed is that dm-mod is loaded before enabling lvm volume groups, so you don't have to add it manually.
Comment by David Rosenstrauch (darose) - Monday, 31 July 2006, 15:42 GMT
? I didn't follow that at all.

When "lvm2" is included in my initrd then I can boot; when it's not I can't. And neither my root or boot partitions are lvm volumes.

I never said this was a problem in initrd/initcpio. But it is a problem. If neither my root or boot partition is an LVM volume, then I shouldn't need to include "lvm2" in my initrd/initcpio. But I do.

And I don't understand what your workaround would accomplish. By the time the boot sequence starts loading MODULES from /etc/fstab it's too late. All the /etc/fstab file systems have already been mounted, right? So if you haven't included lvm in your initrd, then your boot will fail.

Are you not seeing this behavior?
Comment by Thomas Bächler (brain0) - Monday, 31 July 2006, 15:53 GMT
As I wrote above, that behaviour has been changed months ago. The first thing the initscripts do is starting udev and and loading modules. From this point on, the device mapper exists and you can enable lvm volumes (This used to be different, the module loading took place much later with earlier initscripts versions).

It enables lvm volumes later and THEN mounts filesystems from fstab. So where is the problem.
Comment by David Rosenstrauch (darose) - Monday, 31 July 2006, 16:21 GMT
The problem is that I'm not seeing that behavior. If I don't include "lvm2" in my mkinitcpio.conf, I can't boot.

I'll confirm this again when I have a chance in the next day or so, but I know that I saw this happen during the cutover from mkinitrd to mkinitcpio, which only happened a few weeks ago.
Comment by David Rosenstrauch (darose) - Tuesday, 01 August 2006, 01:49 GMT
Thomas - my apologies, you are correct. This is no longer an issue. I just read through your comment again carefully and saw that I did not have dm_mod listed in my MODULES section. So that's why none of my volumes were getting loaded at boot time. (I didn't even know that module was needed, since I never had to explicitly list it before.) Once I changed things to load that module, everything's fine.

Feel free to close the bug.

And thanks for your help.
Comment by Thomas Bächler (brain0) - Tuesday, 01 August 2006, 07:26 GMT
Something could still be done: The module could be automatically loaded (without putting it in MODULES) in case USELVM is enabled. That would be more intuitive.
Comment by David Rosenstrauch (darose) - Tuesday, 01 August 2006, 13:49 GMT
Agreed.

Loading...