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 1557464 - vdo creation device check incomplete
Summary: vdo creation device check incomplete
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: Joe Shimkus
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks: 1600247
TreeView+ depends on / blocked
 
Reported: 2018-03-16 15:40 UTC by Joe Shimkus
Modified: 2019-03-06 01:59 UTC (History)
3 users (show)

Fixed In Version: 6.1.1.109
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1600247 (view as bug list)
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 Joe Shimkus 2018-03-16 15:40:14 UTC
Description of problem:
During creation part of the process is to check that the specified storage device is clean (no filesystem, etc.).  The check presumes that output returned from performing 'pvcreate --test', in the case of an unclean device, begins with a single line indicating a test followed by a second line that indicates the origin of the uncleanliness.  This is incorrect.

The actual output is dependent on the version of the system.
On systems running kernel version 3.10.0-693.2.2.el7.x86_64 the output is as described above.  On systems running kernel version 3.10.0-693.11.1.el7.x86_64 the output is (for example):
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Device for PV 8fGOdV-d4kL-2CUQ-SgMr-Lc0p-p4jW-Hwp4LX not found or rejected by a filter.
  WARNING: Device for PV 8fGOdV-d4kL-2CUQ-SgMr-Lc0p-p4jW-Hwp4LX not found or rejected by a filter.
  WARNING: btrfs signature detected on /dev/dm-0 at offset 65600. Wipe it? [y/n]: [n]

The "not found or rejected" warnings result in the code not recognizing the specific case of uncleanliness.

The creation is still appropriately rejected but the displayed result of the create will not be indicative of the uncleanliness and will not indicate that it can be overridden through the use of --force.

How reproducible:
Dependent on system version.  100% on systems with kernel 3.10.0-693.11.1.el7.x86_64.

Comment 3 Jakub Krysl 2018-07-09 09:40:33 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

I tested by creating LVM vg + lv on iscsi disk and removing the disk without removing the vg:

# iscsiadm -m node -u
Logging out of session [sid: 1, target: iqn.2001-05.com.equallogic:0-af1ff6-6db5d9bd9-f7c9f42596f59bfb-vdo-general, portal: *****]
Logout of [sid: 1, target: iqn.2001-05.com.equallogic:0-af1ff6-6db5d9bd9-f7c9f42596f59bfb-vdo-general, portal: *****] successful.

# vgremove vg -ff
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  Couldn't find device with uuid VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu.
  Aborting vg_write: No metadata areas to write to!

# pvs
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  Couldn't find device with uuid VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu.
  PV         VG                Fmt  Attr PSize    PFree
  /dev/sda2  rhel_storageqe-74 lvm2 a--  <464.76g 4.00m
  [unknown]  vg                lvm2 a-m     2.00t    0

# vdo create --name vdo --device /dev/sdb
Creating VDO vdo
vdo: ERROR -   WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.

# pvs
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  Couldn't find device with uuid VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu.
  PV         VG                Fmt  Attr PSize    PFree
  /dev/sda2  rhel_storageqe-74 lvm2 a--  <464.76g 4.00m
  [unknown]  vg                lvm2 a-m     2.00t    0

# pvcreate --test /dev/sdb
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  WARNING: Device for PV VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu not found or rejected by a filter.
  Couldn't find device with uuid VHzUeB-CClE-Zmc2-e2Ps-8HqE-wshv-juDtXu.
  Device /dev/sdb not found.


# iscsiadm -m node -l
Logging in to [iface: default, target: iqn.2001-05.com.equallogic:0-af1ff6-6db5d9bd9-f7c9f42596f59bfb-vdo-general, portal: *****] (multiple)
Login to [iface: default, target: iqn.2001-05.com.equallogic:0-af1ff6-6db5d9bd9-f7c9f42596f59bfb-vdo-general, portal: *****] successful.
# pvcreate --test /dev/sdb
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Not using lvmetad because duplicate PVs were found.
  WARNING: Use multipath or vgimportclone to resolve duplicate PVs?
  WARNING: After duplicates are resolved, run "pvscan --cache" to enable lvmetad.
  Device /dev/sdb excluded by a filter.

# vdo create --name vdo --device /dev/sdb
Creating VDO vdo
vdo: ERROR -   WARNING: Not using lvmetad because duplicate PVs were found.


So without the iscsi disk the correct line is 'Device /dev/sdb not found.', with the disk it is 'Device /dev/sdb excluded by a filter.'. Yet VDO returns the 1st line every time.

It looks like this works with XFS signature on the disk:
# mkfs.xfs /dev/sdb -f
meta-data=/dev/sdb               isize=512    agcount=4, agsize=134218560 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=536874240, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=262145, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
# pvcreate --test /dev/sdb
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Not using lvmetad because duplicate PVs were found.
  WARNING: Use multipath or vgimportclone to resolve duplicate PVs?
  WARNING: After duplicates are resolved, run "pvscan --cache" to enable lvmetad.
WARNING: xfs signature detected on /dev/sdb at offset 0. Wipe it? [y/n]: n
  Aborted wiping of xfs.
  1 existing signature left on the device.
# vdo create --name vdo --device /dev/sdb
Creating VDO vdo
vdo: ERROR - xfs signature detected on /dev/sdb at offset 0; use --force to override


# pvcreate --test /dev/sdb
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Device for PV 8hkZbv-Os7s-XwQl-MS3k-DS09-nYNl-pAksdW not found or rejected by a filter.
  WARNING: Device for PV 8hkZbv-Os7s-XwQl-MS3k-DS09-nYNl-pAksdW not found or rejected by a filter.
WARNING: xfs signature detected on /dev/sdb at offset 0. Wipe it? [y/n]: n
  Aborted wiping of xfs.
  1 existing signature left on the device.
# vdo create --name vdo --device /dev/sdb
Creating VDO vdo
vdo: ERROR - xfs signature detected on /dev/sdb at offset 0; use --force to override


So the fix itself looks incomplete as it works only if there is FS metadata and fails with device missing or 'device excluded by filter'. Should I give it back?

Comment 4 Joe Shimkus 2018-07-09 14:33:01 UTC
What we have is the vdo manager assumption that the first non-expected line in the output represents the critical information; this is clearly incorrect.  Based on the output you've provided it seems that the salient info is actually in the *last* line of the output, provided vdo manager does not find any specific message for which it is looking (e.g., ... <fsType> signature detected ...).

I'd say give the bug back.

Comment 5 Jakub Krysl 2018-07-25 14:07:50 UTC
# pvcreate --test /dev/sdf
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Not using lvmetad because duplicate PVs were found.
  WARNING: Use multipath or vgimportclone to resolve duplicate PVs?
  WARNING: After duplicates are resolved, run "pvscan --cache" to enable lvmetad.
  Device /dev/sdf not found.


kmod-kvdo-6.1.1.99-1.el7:
# vdo create --name vdo --device /dev/sdf
Creating VDO vdo
vdo: ERROR -   WARNING: Not using lvmetad because duplicate PVs were found.

kmod-kvdo-6.1.1.111-3.el7:
# vdo create --name vdo --device /dev/sdf
Creating VDO vdo
vdo: ERROR - Device /dev/sdf not found.


# pvcreate --test /dev/sdf
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  WARNING: Not using lvmetad because duplicate PVs were found.
  WARNING: Use multipath or vgimportclone to resolve duplicate PVs?
  WARNING: After duplicates are resolved, run "pvscan --cache" to enable lvmetad.
WARNING: xfs signature detected on /dev/sdf at offset 0. Wipe it? [y/n]: N
  Aborted wiping of xfs.
  1 existing signature left on the device.
# vdo create --name vdo --device /dev/sdf
Creating VDO vdo
vdo: ERROR - xfs signature detected on /dev/sdf at offset 0; use --force to override

VDO now picks the correct message from pvcreate --test and passes it to user.

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.