Hide Forgot
+++ This bug was initially created as a clone of Bug #680973 +++ Cloning as I checked the source and this issue is also in RHEL6 Description of problem: When using test mode with the lvm2 command, pvmove (and probably others), you get an error: Command failed with status code 5 Version-Release number of selected component (if applicable): RHEL 6.0 How reproducible: every time Example: root@bbnfs ~]# pvmove -tv /dev/mapper/mpath3p2 /dev/mapper/mpath2p1 Test mode: Metadata will NOT be updated. Finding volume group "nfsVG" Test mode: Skipping archiving of volume group. Creating logical volume pvmove0 Moving 1599 extents of logical volume nfsVG/bbnfs Found volume group "nfsVG" Updating volume group metadata Test mode: Skipping volume group backup. Found volume group "nfsVG" Found volume group "nfsVG" Found volume group "nfsVG" Test mode: Wiping internal cache Wiping internal VG cache Command failed with status code 5. Actual results: Appears the test command failed because of the error Expected results: No Command failed message outputed Additional info: In looking at the code it appears the problem is at: if ((ret != ECMD_PROCESSED) && !error_message_produced()) { log_debug(INTERNAL_ERROR "Failed command did not use log_error"); log_error("Command failed with status code %d.", ret); } We are not testing to see if we are in test mod before printing the message. This is in lvm2_main() and lvm_shell(). So I believe the if statement should be: if ((ret != ECMD_PROCESSED) && !error_message_produced() && !test_mode()) { to avoid printing the Command failed message.
I am really not sure which version you are testing. lvm2-2.02.82-1.el6.i686 # pvmove -vt /dev/sdb2 /dev/sdb1 ; echo $? Test mode: Metadata will NOT be updated and volumes will not be (de)activated. Finding volume group "vg_test" Test mode: Skipping archiving of volume group. Creating logical volume pvmove0 Moving 10 extents of logical volume vg_test/lv Found volume group "vg_test" activation/volume_list configuration setting not defined, checking only host tags for vg_test/lv Updating volume group metadata Found volume group "vg_test" Found volume group "vg_test" Found volume group "vg_test" Test mode: Skipping volume group backup. Test mode: Wiping internal cache Wiping internal VG cache 0 Anyway, there seems to be anothe problem with cluster locking: # lvmconf --enable-cluster # pvmove -vt /dev/sdb2 /dev/sdb1 ; echo $? Test mode: Metadata will NOT be updated and volumes will not be (de)activated. Finding volume group "vg_test" Test mode: Skipping archiving of volume group. Creating logical volume pvmove0 Moving 10 extents of logical volume vg_test/lv Updating volume group metadata Error locking on node bar-01: Input/output error Test mode: Skipping volume group backup. Test mode: Wiping internal cache Wiping internal VG cache 0
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
According to my analysis in clone bug #680973 closing this as fixed in current release. Please reopen if you still see problems here and add exact version of lvm2 package you are using, thank you.