Bug 1498939 - [RFE] implement better error reporting for failing pvcreate
Summary: [RFE] implement better error reporting for failing pvcreate
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.175
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-05 15:16 UTC by Zdenek Kabelac
Modified: 2020-12-02 22:48 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-12-02 22:48:46 UTC
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1545627 0 unspecified CLOSED On devices with a partition table --force option on pvcreate is not effective due to device filtering and the error mess... 2021-09-03 12:41:33 UTC

Internal Links: 1545627

Description Zdenek Kabelac 2017-10-05 15:16:00 UTC
Description of problem:

When user runs 'pvcreate /dev/diskXYZ' he may observe this output:

# pvcreate /dev/diskXYZ
  Device /dev/diskXYZ not found (or ignored by filtering).

This might confuse users - since they are unaware what this means and it would be probably better to expose better message - i.e.  which filter (i.e. MD header found) cause this.  Otherwise  user needs to use  'pvcreate -vvv' and find out exact reason of failure - i.e.:

        /dev/diskXYZ: Skipping md component device

Other reason could be lvm.conf filtering setting, or lvmetad...

Existing error message could be giving more info.

Version-Release number of selected component (if applicable):
2.02.175

How reproducible:


Steps to Reproduce:
1. create mdadm and stop it
2. run pvcreate on one of md raid leg devices
3.

Actual results:


Expected results:


Additional info:

Comment 1 Alasdair Kergon 2017-10-17 02:34:43 UTC
Step one, separate 'not found' from 'excluded by filter'.

https://www.redhat.com/archives/lvm-devel/2017-October/msg00047.html

https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=146745ad88abc0512650b5b40d00ca587784ca36

Second stage will be to record which filter (perhaps in struct device, with some order of precedence so 'cached' doesn't appear if it doesn't need to).

Comment 2 David Teigland 2020-12-02 22:48:46 UTC
recently fixed


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