1 |
Just wanted to let you know, that the error no longer occurs since I updated |
2 |
to lvm2-2.02.63-r1. |
3 |
|
4 |
Regards, |
5 |
Roman Naumann |
6 |
|
7 |
On Sunday 18 April 2010 12:38:45 Roman Naumann wrote: |
8 |
> Hi, |
9 |
> |
10 |
> I'm using LVM, having / and /home as logical volumes and a backup script |
11 |
> creating a logical snapshot volume of each in the process. |
12 |
> |
13 |
> Since I use gentoo (comming from arch), my backup script fails rather often |
14 |
> with the error message 'Can't remove open logical volume <volume>'. The |
15 |
> script worked fine on arch before. The partition setup did not change. |
16 |
> |
17 |
> Sometimes it works fine, sometimes it just fails. |
18 |
> As a workaround, I let the script just lvremove the snapshot three times |
19 |
> with 5 seconds sleeping between the tries and the overall success rate for |
20 |
> the script improved... |
21 |
> The chance is about 40% lvremove succeeds at a given time and doesn't seem |
22 |
> to in- or decrease when calling lvremove successively with a five second |
23 |
> delay, though if it fails once, it tends to fail again more often if |
24 |
> called within the next two or three seconds. |
25 |
> |
26 |
> Here is an example of the command failing once more after the backup script |
27 |
> aborted. The second time it works. I did NOTHING but the commands listed |
28 |
> below in these 30 seconds or so: (note: dmsetup says "open: 0" in the |
29 |
> first place!) |
30 |
> |
31 |
> kira namor # dmsetup info -c vg-snap_root |
32 |
> Name Maj Min Stat Open Targ Event UUID |
33 |
> vg-snap_root 253 5 L--w 0 1 0 LVM- |
34 |
> ayg5GD1dYyrkkan1pLa8WszI7UrQpy9YE2ynOTtHoSNckKdehm3XMIgkw7p8z69X |
35 |
> kira namor # lvremove /dev/vg/snap_root |
36 |
> Can't remove open logical volume "snap_root" |
37 |
> kira namor # lsof /dev/vg/snap_root |
38 |
> kira namor # fuser -a /dev/vg/snap_root |
39 |
> /dev/vg/snap_root: |
40 |
> kira namor # lvremove /dev/vg/snap_root |
41 |
> Do you really want to remove active logical volume snap_root? [y/n]: y |
42 |
> Logical volume "snap_root" successfully removed |
43 |
> |
44 |
> What I tried so far was: |
45 |
> -> calling: lvchange -an $SNAP_PARTITION #fails iff lvremove fails |
46 |
> -> updating to lvm2-2.02.56-r3 and updating the initramfs #fixes nothing |
47 |
> |
48 |
> I have no idea what causes this random behavior. |
49 |
> Help much appreciated. |
50 |
> |
51 |
> Regards, |
52 |
> Roman Naumann |