Bug 505121 - unable to set up device-mapper snapshot
unable to set up device-mapper snapshot
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jonathan Earl Brassow
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-06-10 14:03 EDT by Jeremy Katz
Modified: 2009-07-04 00:55 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-04 00:55:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeremy Katz 2009-06-10 14:03:28 EDT
After building a live image with f12 based rawhide 
   bash-4.0# rpm -q kernel lvm2 device-mapper

the initrd is no longer able to set up the device-mapper snapshot we use for the changes to the live system.

The following errors are given
device-mapper: snapshot exception stores: Module for exstore type "p" not found"
device-mapper: table: 253: 0: snapshot: Couldn't create exception store
device-mapper: ioctl: error adding target to table
Comment 1 Chuck Ebbert 2009-06-14 20:05:15 EDT
Looking at drivers/md/dm-exception-store.c:get_type():

        while (request_module("dm-exstore-%s", type_name_dup) ||

There are no modules with names like that -- looks like this should be "dm-snap-%s". And those modules are built into dm-snapshot.ko anyway.

Also I don't see any backwards-compatible translation of the names. e.g. if we get asked for "p" but the backwards-compat name in the registry is "P" it doesn't match.
Comment 2 Alasdair Kergon 2009-06-14 20:52:11 EDT
The module loading is a red herring.

The n and p are defined to be case-insensitive.  Did that get lost?
Comment 3 Jonathan Earl Brassow 2009-06-17 15:13:09 EDT
I am looking at the 2.6.30 kernel... but this should be a problem, no?

		persistent = toupper(*argv[1]);
		if (persistent != 'P' && persistent != 'N') {
			ti->error = "Persistent flag is not P or N";
			return -EINVAL;
		type = get_type(argv[1]);
		if (!type) {
			ti->error = "Exception store type not recognised";
			r = -EINVAL;
			goto bad_type;

We are 'toupper'ing *argv[1] and storing the result in 'persistent', but we are then using argv[1] in 'get_type'!
Comment 4 Matthias Clasen 2009-06-25 16:37:44 EDT
Can we get the one-liner fix into rawhide ? 
Being able to create working live cds is essential to our f12 testing effort...
Comment 5 Mike Snitzer 2009-06-26 12:27:12 EDT
This should be resolved now that rawhide has been updated to >= 2.6.31-rc1
Comment 6 Jeremy Katz 2009-06-29 10:43:42 EDT
Still getting the same error with 2.6.31-0.33.rc1.git2.fc12.i586
Comment 7 Chuck Ebbert 2009-06-29 18:02:05 EDT
Should be fixed in 2.6.31-0.34.rc1.git2.fc12

Note You need to log in before you can comment on or make changes to this bug.