Bug 13672

Summary: Cannot get a snapshot from an logical volume
Product: IO/Storage Reporter: Jean-Luc Coulon (jean.luc.coulon)
Component: LVM2/DMAssignee: Alasdair G Kergon (agk)
Status: CLOSED CODE_FIX    
Severity: normal CC: agk, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.31-rc1-git3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 13615    

Description Jean-Luc Coulon 2009-06-29 13:11:08 UTC
Distribution : Debian sid
System : athlon64 x2 4200+
Architecture : x86_64

This is working on 2.6.30

I want to get a snapshot of an lvm logical volume (encrypted, XFS filesystem)

I get:
[jean-luc@tangerine] % sudo lvcreate -l 500 -s -n snap /dev/cryptvg0/home_lv
  device-mapper: reload ioctl failed: invalid parameter
  Failed to suspend origin home_lv

With 2.6.30, I get:
[jean-luc@tangerine] % sudo lvcreate -l 500 -s -n snap /dev/cryptvg0/home_lv
  Logical volume "snap" created

Maybe this is related to http://bugzilla.kernel.org/show_bug.cgi?id=13641

Regards

Jean-Luc
Comment 1 Alasdair G Kergon 2009-06-30 09:55:15 UTC
Check mesg/kernel log file for slightly more information and post it here.  (There's one known regression in snapshots - failing to recognise the snapshot type N or P - it might be related. There's a patch for that in -mm.)
Comment 2 Jean-Luc Coulon 2009-06-30 12:04:28 UTC
I tried to boot 2.6.31-git4.
It failed to moount /usr (which is also on xfs over lvm).

Here are some relevant parts of the boot log.

Linux version 2.6.31-rc1-git4-k8-1 (jean-luc@tangerine) (gcc version 4.3.3 (Debian 4.3.3-13) ) #1 SMP PREEMPT Mon Jun 29 13:29:10 CEST 2009
Command line: BOOT_IMAGE=/vmlinuz-2.6.31-rc1-git4-k8-1 root=/dev/mapper/vg0-root_lv ro video=radeonfb:1024x768@100 quiet
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  Centaur CentaurHauls
....
....

md: raid1 personality registered for level 1
md: md0 stopped.
md: md1 stopped.
md: md2 stopped.
md: bind<sdc3>
md: bind<sdb3>
raid1: raid set md2 active with 2 out of 2 mirrors
 md2: unknown partition table
md: bind<sdc2>
md: bind<sdb2>
raid1: raid set md1 active with 2 out of 2 mirrors
 md1: unknown partition table
md: bind<sdc1>
md: bind<sdb1>
raid1: raid set md0 active with 2 out of 2 mirrors
 mdusb 3-1: New USB device found, idVendor=0463, idProduct=ffff
usb 3-1: New USB device strings: Mfr=4, Product=12, SerialNumber=0
usb 3-1: Product: ELLIPSE
usb 3-1: Manufacturer: MGE
usb 3-1: configuration #1 chosen from 1 choice
device-mapper: table: 254:0: target device md1 is misaligned
device-mapper: table: 254:0: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:1: target device md1 is misaligned
device-mapper: table: 254:2: target device md1 is misaligned

....
....

device-mapper: snapshot exception stores: Module for exstore type "P`<D1>o^A" not found.
device-mapper: table: 254:5: snapshot: Couldn't create exception store
device-mapper: ioctl: error adding target to table
device-mapper: table: 254:6: target device md1 is misaligned
device-mapper: table: 254:6: target device md1 is misaligned

....
....

device-mapper: table: 254:7: target device md2 is misaligned
device-mapper: table: 254:7: target device md2 is misaligned
device-mapper: table: 254:7: target device md2 is misaligned
device-mapper: table: 254:7: target device md2 is misaligned
device-mapper: table: 254:8: target device dm-7 is misaligned
device-mapper: table: 254:8: target device dm-7 is misaligned
device-mapper: table: 254:8: target device dm-7 is misaligned
device-mapper: table: 254:8: target device dm-7 is misaligned

...
...

device-mapper: table: 254:9: target device dm-7 is misaligned
device-mapper: table: 254:9: target device dm-7 is misaligned
device-mapper: table: 254:9: target device dm-7 is misaligned
device-mapper: table: 254:10: target device dm-7 is misaligned
device-mapper: table: 254:10: target device dm-7 is misaligned
device-mapper: table: 254:11: target device dm-7 is misaligned
device-mapper: table: 254:11: target device dm-7 is misaligned
device-mapper: table: 254:11: target device dm-7 is misaligned

....
....

device-mapper: table: 254:16: target device dm-7 is misaligned
device-mapper: table: 254:16: target device dm-7 is misaligned
device-mapper: snapshot exception stores: Module for exstore type "P`<F1>t^B" not found.
device-mapper: table: 254:17: snapshot: Couldn't create exception store
device-mapper: ioctl: error adding target to table
device-mapper: table: 254:18: target device dm-7 is misaligned
device-mapper: table: 254:18: target device dm-7 is misaligned
device-mapper: table: 254:18: target device dm-7 is misaligned
device-mapper: table: 254:18: target device dm-7 is misaligned
device-mapper: snapshot exception stores: Module for exstore type "P`<B1><AB>^B" not found.
device-mapper: table: 254:5: snapshot: Couldn't create exception store
device-mapper: ioctl: error adding target to table
fuse init (API version 7.11)
kjournald starting.  Commit interval 5 seconds
EXT3 FS on md0, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
XFS: SB read failed
XFS mounting filesystem dm-1
Ending clean XFS mount for filesystem: dm-1
XFS: SB read failed
XFS mounting filesystem dm-8
Ending clean XFS mount for filesystem: dm-8
XFS mounting filesystem dm-13
Ending clean XFS mount for filesystem: dm-13
XFS mounting filesystem dm-11
Ending clean XFS mount for filesystem: dm-11
XFS mounting filesystem dm-12
Ending clean XFS mount for filesystem: dm-12
XFS mounting filesystem dm-10
Ending clean XFS mount for filesystem: dm-10


Then the boot process ends because /usr was not mounted.


J-L
Comment 3 Milan Broz 2009-06-30 12:31:53 UTC
bugzilla-daemon@bugzilla.kernel.org wrote:
> --- Comment #2 from Jean-Luc Coulon <jean.luc.coulon@gmail.com>  2009-06-30
> 12:04:28 ---

> device-mapper: snapshot exception stores: Module for exstore type "P`<D1>o^A"
> not found.

This is problem and there is bug in exception store type name handling which must be fixed,
introduced by commit f6bd4eb73cdf2a5bf954e497972842f39cabb7e3

(I'll send patch later here).

Thanks for reporting it.
Milan
Comment 4 Milan Broz 2009-07-01 10:26:45 UTC
bugzilla-daemon@bugzilla.kernel.org wrote:

> device-mapper: table: 254:0: target device md1 is misaligned

Fixed by upstream commit

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ea9df47cc92573b159ef3b4fda516c32cba9c4fd

> device-mapper: snapshot exception stores: Module for exstore type "P`<D1>o^A"
> not found.

and this one by
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=874d2f61d31e596c36af7732dc1b3aa2dc233824


Milan