Bug 505121

Summary: unable to set up device-mapper snapshot
Product: [Fedora] Fedora Reporter: Jeremy Katz <katzj>
Component: kernelAssignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: agk, bmarzins, bmr, dwysocha, heinzm, itamar, kernel-maint, lvm-team, mbroz, mclasen, msnitzer, prockai, quintela
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-04 04:55:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeremy Katz 2009-06-10 18:03:28 UTC
After building a live image with f12 based rawhide 
   bash-4.0# rpm -q kernel lvm2 device-mapper
   kernel-2.6.30-0.97.rc8.fc12.i586
   lvm2-2.02.47-1.fc12.i586
   device-mapper-1.02.32-1.fc12.i586

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-15 00:05:15 UTC
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-15 00:52:11 UTC
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 19:13:09 UTC
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 20:37:44 UTC
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 16:27:12 UTC
This should be resolved now that rawhide has been updated to >= 2.6.31-rc1

Comment 6 Jeremy Katz 2009-06-29 14:43:42 UTC
Still getting the same error with 2.6.31-0.33.rc1.git2.fc12.i586

Comment 7 Chuck Ebbert 2009-06-29 22:02:05 UTC
Should be fixed in 2.6.31-0.34.rc1.git2.fc12