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#17124 - [lvm2] machine does not boot if there is a lvm2 snapshot of root filesystem (dm-snapshot missing)

Attached to Project: Arch Linux
Opened by Sebastian (sepo) - Friday, 13 November 2009, 16:59 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 06 February 2010, 02:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I recently made a lvm2 snapshot of my root filesystem and forgot to delete the snapshot after i was done with the snapshot. At the next reboot the system fails to boot telling me that the dm-snapshot module couldn't be found.

This problem is explained here too: http://sourcefrog.net/weblog/2007/05/index.html

Adding the dm-snapshot to the initrd fixes this.

And i think the same applies for the dm-mirror module, it should be in initrd too. As far as i can see debian has both in initrd.

Take a look at the attached patch.


Additional info:

* package version: lvm2 2.02.53-1 (the package in testing doesn't fix this either)


Steps to reproduce:

if /dev/${lvm_volume_group}/${volume_name} is your root filesystem

lvcreate -s -L${size} -n${name} /dev/${lvm_volume_group}/${volume_name}
reboot

This task depends upon

Closed by  Eric Belanger (Snowman)
Saturday, 06 February 2010, 02:21 GMT
Reason for closing:  Fixed
Comment by Thomas Bächler (brain0) - Saturday, 14 November 2009, 01:05 GMT
IMO, only adding the modules should be sufficient, they should be autoloaded if needed. Can you test this please? Only add the MODULES="..." change and not the modprobe changes.
Comment by Sebastian (sepo) - Saturday, 14 November 2009, 10:02 GMT
I just tried it. You are right Thomas, adding the modules to the MODULES="..." variable in the install file is enough. The system boots without any problem.

I can confirm that this applies to the dm-mirror module too. I tried to boot a mirrored root volume, it fails in the same way as i explained above. So the dm-mirror module is needed too.
Comment by Thomas Bächler (brain0) - Saturday, 14 November 2009, 10:12 GMT
Thanks. So I will add the modules to the image, but let LVM decide whether it needs to load them or not:

http://repos.archlinux.org/wsvn/packages/?compare[]=%2Flvm2%2Ftrunk%2F%4058761&compare[]=%2Flvm2%2Ftrunk%2F%4058298&comparesubmit=Compare+Revisions&op=comp
Comment by Sebastian (sepo) - Saturday, 14 November 2009, 10:32 GMT
Alright, thank you.
Comment by Sebastian (sepo) - Wednesday, 27 January 2010, 10:24 GMT
I just installed the package 2.02.60-2 from testing. I created a snapshot of the root fs (lvcreate -s -n snap1 -L 100M /dev/storage/root) and after a reboot my system hangs with the following message.

<message>
...
FATAL: Module dm_snapshot not found.
/sbin/modprobe failed: 1
...
</message>

To fix this the lvm2 install script should trigger an mkinitcpio -p kernel26 to rebuild the initrd.

After generating a new initrd the system boot up properly, but i get the following message while loading lvm2.
Mounting the snapshot after system boot does work without any problems.

<message>
...
:: Activating LVM2 groups
File-based locking initialisation failed.
File-based locking initialisation failed.
Child exited with code 5
Unable to start dmeventd.
Child exited with code 5
Unable to start dmeventd.
storage-snap: event registration failed: No such process
storage/snapshot0: snapshot segment monitoring function failed.
Child exited with code 5
Unable to start dmeventd
Child exited with code 5
Unable to start dmeventd
storage-snap: event registration failed: No such process
storage/snapshot0: snapshot segment monitoring function failed.
...
</message>

The message "File-based locking initialisation failed." does not seem to be a problem according to http://www.redhat.com/archives/linux-lvm/2009-August/thread.html#00003 , what about the rest?
Comment by Eric Belanger (Snowman) - Friday, 05 February 2010, 23:10 GMT
I don't think the other hooks regenerate the initrd and I'm not sure if it's something that we want to do.

Thomas: Any input? Or can we just close this bug?
Comment by Thomas Bächler (brain0) - Friday, 05 February 2010, 23:18 GMT
Yeah, do it.

Loading...