Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-11 Thread Guido Günther
Hi Tim,
On Sun, Jun 08, 2008 at 10:59:33AM +0100, Tim Woodall wrote:
> Copied the kpartx deb and multipath-tools deb to feynman and installed
> them.
The problem here is that we need the udev rules and a more recent
dmsetup to actually test if we still trigger your problem. However since
changing the udev rule from add to change fixed it we can safely assume
this fixed in lenny. Thanks a lot for your help.
Cheers,
 -- Guido



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-08 Thread Tim Woodall

On Sat, 7 Jun 2008, Guido Günther wrote:


On Sat, Jun 07, 2008 at 04:07:49PM +0100, Tim Woodall wrote:

With the add replaced with change, or the udev rule removed completely I've
never seen a failure.

O.k. find. A mark the bug as fixed in lenny then.


Do you have a chance to try the packages from lenny? Kpartx is split out
into a separate package there and the udev rules are much more robust.
There are packports of this versions available here:

http://debian.bzed.de/etch-backports/devmapper_1.02.24-4~bpo40+1.dsc
http://debian.bzed.de/etch-backports/multipath-tools_0.4.8-7~bpo40+1.dsc


Not easily on this machine. But I can probably test on another machine
if it would help you.

Yes, this would help indeed. So we can be really sure that this is
fixed in lenny.


Ok. I've not been able to reliably reproduce the problem on any other
machine. So I've done the following - hope this is sufficient for you:

Taken the multipath-tools*.tar.gz and extracted it on another etch machine.
Built it with fakeroot ./debian/rules binary

Copied the kpartx deb and multipath-tools deb to feynman and installed
them.

Then rerun my test which seems to work correctly. I've not seen any
failures.

I haven't done anything with devmapper. Not sure if that matters or not
for you but I don't really want to start replacing existing packages on
this machine even temporarily and I assume that will replace
libdevmapper.

Tim.

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

   http://www.woodall.me.uk/http://www.locofungus.btinternet.co.uk/

Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-07 Thread Guido Günther
On Sat, Jun 07, 2008 at 04:07:49PM +0100, Tim Woodall wrote:
> With the add replaced with change, or the udev rule removed completely I've
> never seen a failure.
O.k. find. A mark the bug as fixed in lenny then.

>> Do you have a chance to try the packages from lenny? Kpartx is split out
>> into a separate package there and the udev rules are much more robust.
>> There are packports of this versions available here:
>>
>> http://debian.bzed.de/etch-backports/devmapper_1.02.24-4~bpo40+1.dsc
>> http://debian.bzed.de/etch-backports/multipath-tools_0.4.8-7~bpo40+1.dsc
>>
> Not easily on this machine. But I can probably test on another machine
> if it would help you.
Yes, this would help indeed. So we can be really sure that this is
fixed in lenny.

> Note that I've not tested if that add->change breaks anything else. I'm
> not even sure how to test this udev rule.
Basically this will only work with partitioned dm devices.
Cheers and thanks for testing!
 -- Guido



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-07 Thread Tim Woodall

On Sat, 7 Jun 2008, Guido Günther wrote:


On Fri, Jun 06, 2008 at 10:33:36PM +0100, Tim Woodall wrote:

The /etc/udev/rules.d/multipath.rules exposes a race that causes LVM
snapshots to fail to be created intermittently.

You mean:

# take care of devmap partitioning
ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
   PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c
-o name info", \
   RUN+="/sbin/kpartx -a /dev/mapper/%c"

Does changing ACTION="add" into ACTION="change" do any good?


Yes. That seems to fix my LVM problem.

I'm using the following simple test script:
feynman:~# cat testlvm
#!/bin/bash

for i in $( seq 1 10 ); do
/sbin/lvcreate -A n -L500M -s -nroot-backup /dev/vg0/root
sleep 2
/sbin/lvremove -A n -f /dev/vg0/root-backup
sleep 2
done

exit 0

With the ACTION=="add" a typical run looks like this: (note that the
machine has to be idle. If there's lots of disk access then the LVM
snapshot seems to work regardless)

feynman:~# ./testlvm
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed
  LV vg0/root-backup in use: not deactivating
  Couldn't deactivate new snapshot.
  Logical volume "root-backup" successfully removed
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed
  LV vg0/root-backup in use: not deactivating
  Couldn't deactivate new snapshot.
  Logical volume "root-backup" successfully removed
  LV vg0/root-backup in use: not deactivating
  Couldn't deactivate new snapshot.
  Logical volume "root-backup" successfully removed
  LV vg0/root-backup in use: not deactivating
  Couldn't deactivate new snapshot.
  Logical volume "root-backup" successfully removed
  Logical volume "root-backup" created
  Logical volume "root-backup" successfully removed

I've never had fewer than 2 failures (20%) running this script with the
multipath.rules script when the machine is idle.

With the add replaced with change, or the udev rule removed completely I've
never seen a failure.


Do you have a chance to try the packages from lenny? Kpartx is split out
into a separate package there and the udev rules are much more robust.
There are packports of this versions available here:

http://debian.bzed.de/etch-backports/devmapper_1.02.24-4~bpo40+1.dsc
http://debian.bzed.de/etch-backports/multipath-tools_0.4.8-7~bpo40+1.dsc


Not easily on this machine. But I can probably test on another machine
if it would help you.

Note that I've not tested if that add->change breaks anything else. I'm
not even sure how to test this udev rule.

Tim.

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

   http://www.woodall.me.uk/http://www.locofungus.btinternet.co.uk/

Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-07 Thread Guido Günther
On Fri, Jun 06, 2008 at 10:33:36PM +0100, Tim Woodall wrote:
> The /etc/udev/rules.d/multipath.rules exposes a race that causes LVM
> snapshots to fail to be created intermittently.
You mean:

# take care of devmap partitioning
ACTION=="add", SUBSYSTEM=="block", KERNEL=="dm-*", \
PROGRAM="/sbin/dmsetup -j %M -m %m --noopencount --noheadings -c
-o name info", \
RUN+="/sbin/kpartx -a /dev/mapper/%c"

Does changing ACTION="add" into ACTION="change" do any good?

> This caused my backups to suddenly start failing when I installed this
> package to get kpartx.
> 
> /sbin/lvcreate -A n -L500M -s -nroot-backup /dev/vg0/root
>   LV vg0/root-backup in use: not deactivating
>   Couldn't deactivate new snapshot.
Do you have a chance to try the packages from lenny? Kpartx is split out
into a separate package there and the udev rules are much more robust.
There are packports of this versions available here:

http://debian.bzed.de/etch-backports/devmapper_1.02.24-4~bpo40+1.dsc
http://debian.bzed.de/etch-backports/multipath-tools_0.4.8-7~bpo40+1.dsc

Cheers,
 -- Guido



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#484823: multipath-tools: /etc/udev/rules.d/multipath.rules breaks LVM snapshots

2008-06-06 Thread Tim Woodall
Package: multipath-tools
Version: 0.4.7-1.1etch1
Severity: normal

The /etc/udev/rules.d/multipath.rules exposes a race that causes LVM
snapshots to fail to be created intermittently.

This caused my backups to suddenly start failing when I installed this
package to get kpartx.

/sbin/lvcreate -A n -L500M -s -nroot-backup /dev/vg0/root
  LV vg0/root-backup in use: not deactivating
  Couldn't deactivate new snapshot.

This seems closely related to bug 343671.


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]