Comment 18 for bug 1369524

Revision history for this message
Alexei Sheplyakov (asheplyakov) wrote :

> Short steps to reproduce:
> # dd if=/dev/zero of=/root/tmp bs=1G count=2
> # losetup /dev/loop0 /root/tmp
> # pvcreate /dev/loop0
> # vgcreate testvg /dev/loop0
> # lvcreate -L 1G testvg -n test

> Then in parallel write to a new volume (e.g.: sudo dd if=/dev/zero of=/dev/testvg/test bs=1G count=2)
> and run 'lvremove -f /dev/testvg/test' command.

> Expected result:
> Logical volume "test" successfully removed

The expectation is totally wrong. The device which is in use can not (and should not) be removed.
The --force switch does not override/bypass the check, it's just skips the confirmation step (which
is intended for interactive usage).