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.
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) & edgy_chroot- i386
# lvcreate -s -L1G -n test1 /dev/systemvg/
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. :(