Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ 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
Comment 2RHEL Program Management
2011-04-04 01:52:55 UTC
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.