Comment 2 for bug 84672

Revision history for this message
Kees Cook (kees) wrote : Re: [feisty] failures when opening snapshots

Tracked this down a bit more. There is some race condition with lv_activate. If I load up with IO, I can win the race. (I assume I'm either slowing down the vgck from udev, or slowing down the lvcreate itself...)

Here's a failure:

# lvcreate -s -L1G -n test1 /dev/systemvg/edgy_chroot-i386
  LV systemvg/test1 in use: not deactivating
  Couldn't deactivate new snapshot.

And if I nudge the disks, I can get a success:

# (ls -lR /var >/dev/null) &
# lvcreate -s -L1G -n test1 /dev/systemvg/edgy_chroot-i386
  Logical volume "test1" created

Putting a "sleep(2)" at the start of lv_activate also "solved" it, but doing retries within lv_activate just ends up hanging the command. :(