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.
Bug 1543921 - vdo start --forceRebuild gives wrong error
Summary: vdo start --forceRebuild gives wrong error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Bryan Gurney
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-09 15:18 UTC by Jakub Krysl
Modified: 2019-03-06 02:36 UTC (History)
4 users (show)

Fixed In Version: 6.1.1.18
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:39:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3094 0 None None None 2018-10-30 09:39:50 UTC

Description Jakub Krysl 2018-02-09 15:18:59 UTC
Description of problem:
# vdo stop --force --name=vdo_test
Stopping VDO vdo_test

# vdo start --force --name=vdo_test
Starting VDO vdo_test
vdo: ERROR - Device vdo_test not read-only
vdo: ERROR - Could not set up device mapper for vdo_test
vdo: ERROR - vdoforcerebuild: forceRebuild failed on '/dev/mapper/rhel_intel--canoepass--02-home': VDO Status: The device is not in a clean state

The error "VDO Status: The device is not in a clean state" is wrong here, as the device IS in clean state.

Version-Release number of selected component (if applicable):
vdo-6.1.0.146-16

How reproducible:
100%

Steps to Reproduce:
1. vdo create --name vdo --device /dev/sdc
2. vdo stop --name vdo
3. vdo start --name vdo --forceRebuild

Actual results:
Starting VDO vdo_test
vdo: ERROR - Device vdo_test not read-only
vdo: ERROR - Could not set up device mapper for vdo_test
vdo: ERROR - vdoforcerebuild: forceRebuild failed on '/dev/mapper/rhel_intel--canoepass--02-home': VDO Status: The device is not in a clean state

Expected results:
vdo: ERROR - vdoforcerebuild: forceRebuild failed on '/dev/mapper/rhel_intel--canoepass--02-home': VDO Status: The device is in a clean state
 
or

vdo: ERROR - vdoforcerebuild: forceRebuild failed on '/dev/mapper/rhel_intel--canoepass--02-home': VDO Status: The device must not be in clean state

Additional info:

Comment 2 Bryan Gurney 2018-02-09 18:31:11 UTC
When I try this on my system with 6.1.0.146 installed, I see this message in /var/log/messages:

UDS/vdoforcerebuild[20440]: ERROR  (vdoforcerebuild/20440) Can't force rebuild on a normal VDO: VDO Status: The device is not in a clean state (2064)

This is correct; the "vdo start --forceRebuild" command will only run on a VDO volume that has an operating mode of "read-only".  This message is slightly different that what appears in stdout on the shell that executed the "vdo start --forceRebuild" command.

Comment 3 Andy Walsh 2018-02-09 19:04:31 UTC
(In reply to Bryan Gurney from comment #2)
> When I try this on my system with 6.1.0.146 installed, I see this message in
> /var/log/messages:
> 
> UDS/vdoforcerebuild[20440]: ERROR  (vdoforcerebuild/20440) Can't force
> rebuild on a normal VDO: VDO Status: The device is not in a clean state
> (2064)
> 
> This is correct; the "vdo start --forceRebuild" command will only run on a
> VDO volume that has an operating mode of "read-only".  This message is
> slightly different that what appears in stdout on the shell that executed
> the "vdo start --forceRebuild" command.

Except it's not.  The error says the device is not in a clean state, when it really is.

Is there a difference between "clean" and "read-only"?

The message "The device is not in a clean state" makes me think "I need to rebuild", but then the forced rebuild doesn't run for that message.  It seems be incorrectly worded to the outsider.

Comment 5 Jakub Krysl 2018-07-09 08:31:24 UTC
Tested on:
RHEL-7.6-20180626.0
kernel-3.10.0-915.el7
kmod-vdo-6.1.1.99-1.el7
vdo-6.1.1.99-2.el7

# vdo create --name vdo --device /dev/sdb
Creating VDO vdo
Starting VDO vdo
Starting compression on VDO vdo
VDO instance 0 volume is ready at /dev/mapper/vdo
# vdo stop --name vdo
Stopping VDO vdo
# vdo start --name vdo --forceRebuild --verbose
Starting VDO vdo
    dmsetup status vdo
    grep MemAvailable /proc/meminfo
    modprobe kvdo
    vdoforcerebuild /dev/disk/by-id/scsi-360fff19abdd9b56dfb9bf59625f4c9f7
vdo: ERROR - Device vdo not read-only
vdo: ERROR - Could not set up device mapper for vdo
vdo: ERROR - vdoforcerebuild: forceRebuild failed on '/dev/disk/by-id/scsi-360fff19abdd9b56dfb9bf59625f4c9f7': VDO Status: The device is not in read-only mode

The message no longer suggest the device is dirty.

Comment 7 errata-xmlrpc 2018-10-30 09:39:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3094


Note You need to log in before you can comment on or make changes to this bug.