[linux-lvm] [PATCH] lvremove: perform retry logic also on -real subvolume for snapshots
christian at iwakd.de
Wed Jul 31 11:31:33 UTC 2013
>> This commit is a follow-up on the first change. If the last snapshot
>> a volume is removed, the -real subvolume is not removed via the
>> codepath that has the retry logic, but by just doing a cleanup of
>> unused volumes. This means that spurious failures may still occur,
>> although not as often.
> These subvolumes should already be properly marked with flags
> we attach to them during their creation - these are then sent
> encoded in uevent and udev rules are skipped based on it,
> including skipping the WATCH udev rule.
Then perhaps it's not udev? I stumbled across the problem myself with
an old version of LVM (it failed like 95% of the time if udisks was
installed, without it failed less often but still quite a bit), then
after a lot of research I found out that this was supposedly fixed in
a current version, I upgraded and then it became rarer but still
occured in around 5% of cases (I had run a script that would create
a snapshot, mount it, umount it and remove the snapshot, all done in
a loop that only stopped on failure). After a *lot* of debugging and
applying the patch I sent here, I couldn't reproduce a single failure
anymore with 2000 tries. (I stopped afterwards, that was good enough
> ..but yes, we could probably add this patch to make sure something
> like that does not happen at all.
I'd appreciate it, thanks.
> But still it would be better to look why those spurious events
> are triggered for non-top-level volumes (it's possible the
> OPTIONS:="nowatch" in some case, I'll check...).
I can try to see if I can reproduce it later this week with udevd
running with --debug to see what is going on.
More information about the linux-lvm