* [gentoo-user] Random failures: lvremove
@ 2010-04-18 10:38 Roman Naumann
2010-04-26 10:15 ` Roman Naumann
0 siblings, 1 reply; 2+ messages in thread
From: Roman Naumann @ 2010-04-18 10:38 UTC (permalink / raw
To: gentoo-user
Hi,
I'm using LVM, having / and /home as logical volumes and a backup script
creating a logical snapshot volume of each in the process.
Since I use gentoo (comming from arch), my backup script fails rather often
with the error message 'Can't remove open logical volume <volume>'. The script
worked fine on arch before. The partition setup did not change.
Sometimes it works fine, sometimes it just fails.
As a workaround, I let the script just lvremove the snapshot three times with
5 seconds sleeping between the tries and the overall success rate for the
script improved...
The chance is about 40% lvremove succeeds at a given time and doesn't seem to
in- or decrease when calling lvremove successively with a five second delay,
though if it fails once, it tends to fail again more often if called within
the next two or three seconds.
Here is an example of the command failing once more after the backup script
aborted. The second time it works. I did NOTHING but the commands listed below
in these 30 seconds or so: (note: dmsetup says "open: 0" in the first place!)
kira namor # dmsetup info -c vg-snap_root
Name Maj Min Stat Open Targ Event UUID
vg-snap_root 253 5 L--w 0 1 0 LVM-
ayg5GD1dYyrkkan1pLa8WszI7UrQpy9YE2ynOTtHoSNckKdehm3XMIgkw7p8z69X
kira namor # lvremove /dev/vg/snap_root
Can't remove open logical volume "snap_root"
kira namor # lsof /dev/vg/snap_root
kira namor # fuser -a /dev/vg/snap_root
/dev/vg/snap_root:
kira namor # lvremove /dev/vg/snap_root
Do you really want to remove active logical volume snap_root? [y/n]: y
Logical volume "snap_root" successfully removed
What I tried so far was:
-> calling: lvchange -an $SNAP_PARTITION #fails iff lvremove fails
-> updating to lvm2-2.02.56-r3 and updating the initramfs #fixes nothing
I have no idea what causes this random behavior.
Help much appreciated.
Regards,
Roman Naumann
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] Random failures: lvremove
2010-04-18 10:38 [gentoo-user] Random failures: lvremove Roman Naumann
@ 2010-04-26 10:15 ` Roman Naumann
0 siblings, 0 replies; 2+ messages in thread
From: Roman Naumann @ 2010-04-26 10:15 UTC (permalink / raw
To: gentoo-user
Just wanted to let you know, that the error no longer occurs since I updated
to lvm2-2.02.63-r1.
Regards,
Roman Naumann
On Sunday 18 April 2010 12:38:45 Roman Naumann wrote:
> Hi,
>
> I'm using LVM, having / and /home as logical volumes and a backup script
> creating a logical snapshot volume of each in the process.
>
> Since I use gentoo (comming from arch), my backup script fails rather often
> with the error message 'Can't remove open logical volume <volume>'. The
> script worked fine on arch before. The partition setup did not change.
>
> Sometimes it works fine, sometimes it just fails.
> As a workaround, I let the script just lvremove the snapshot three times
> with 5 seconds sleeping between the tries and the overall success rate for
> the script improved...
> The chance is about 40% lvremove succeeds at a given time and doesn't seem
> to in- or decrease when calling lvremove successively with a five second
> delay, though if it fails once, it tends to fail again more often if
> called within the next two or three seconds.
>
> Here is an example of the command failing once more after the backup script
> aborted. The second time it works. I did NOTHING but the commands listed
> below in these 30 seconds or so: (note: dmsetup says "open: 0" in the
> first place!)
>
> kira namor # dmsetup info -c vg-snap_root
> Name Maj Min Stat Open Targ Event UUID
> vg-snap_root 253 5 L--w 0 1 0 LVM-
> ayg5GD1dYyrkkan1pLa8WszI7UrQpy9YE2ynOTtHoSNckKdehm3XMIgkw7p8z69X
> kira namor # lvremove /dev/vg/snap_root
> Can't remove open logical volume "snap_root"
> kira namor # lsof /dev/vg/snap_root
> kira namor # fuser -a /dev/vg/snap_root
> /dev/vg/snap_root:
> kira namor # lvremove /dev/vg/snap_root
> Do you really want to remove active logical volume snap_root? [y/n]: y
> Logical volume "snap_root" successfully removed
>
> What I tried so far was:
> -> calling: lvchange -an $SNAP_PARTITION #fails iff lvremove fails
> -> updating to lvm2-2.02.56-r3 and updating the initramfs #fixes nothing
>
> I have no idea what causes this random behavior.
> Help much appreciated.
>
> Regards,
> Roman Naumann
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-26 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-18 10:38 [gentoo-user] Random failures: lvremove Roman Naumann
2010-04-26 10:15 ` Roman Naumann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox