https://bugzilla.novell.com/show_bug.cgi?id=737198 https://bugzilla.novell.com/show_bug.cgi?id=737198#c0 Summary: lvm: Making a vg unavailable sometimes fails if it was used before Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0 When I create a LVM volume group and a logical volume, and then try to set the volume group unavailable (with "vgchange -a n"), this sometimes fails. Reproducible: Sometimes Steps to Reproduce: I tested this in a VirtualBox (hosted on oS 11.4) with a fresh 48GiB harddisk, which is booted from November's 12.1 KDE-LiveCD. Caution: This destroys /dev/sda ! Run this: ################################################################ DEV=/dev/sda dd if=/dev/zero of=$DEV bs=1K count=1K pvcreate $DEV vgcreate testvg $DEV lvcreate -l 100%VG -n testlv testvg mkswap -f /dev/testvg/testlv vgchange -a n testvg ################################################################ Actual Results: Can't deactivate volume group "testvg" with 1 open logical volume(s) Expected Results: 0 logical volume(s) in volume group "testvg" now active It only fails if this script is saved to a file and executed as a whole by bash. Manually typing in the commands is too slow. To repeat the script after a failure ("Can't deactivate..."), you will have to wait a few seconds, then again "vgchange -a n testvg", which should succeed. It does not always fail. Here's what I observed. After booting the machine, the script succeeds several times. After maybe a dozen cycles of the script, it suddenly fails for the first time, and then it fails in most cases. mkswap seems to be innocent. After a reboot, I couldn't get it to fail without the mkswap-line, but after the first failure, it mostly fails even without the mkswap-line. I'm quite sure there is a race-condition involved somewhere. I retried it with a loop-device that is backed by a file in /tmp. On the Live-CD such a file resides entirely in memory I understand. It never failed on this device. Then I created an ext4 on /dev/sda and used a file on this fs for a loop device. There it failed, but I had the impression that it failed less often. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.