linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user
Date: Mon, 20 Jul 2020 19:02:15 +0800	[thread overview]
Message-ID: <b482a655-342c-86f9-085d-e09a1ffe8bb0@suse.com> (raw)

Hello list,

first, I give a example, if a disk (/dev/sdb) has md metadata info. the pvcreate cmd will be failed and show info:
```
# pvcreate /dev/sdb
Device /dev/sdb excluded by a filter
```

For developer, if he wants to know the reason, he may execute below command:
```
# pvcreate -vvvv -ddddd 2>&1 /dev/sdb | grep filter | grep sdb
17:55:50.87938 pvcreate[15739] filters/filter-partitioned.c:31 filter partitioned deferred /dev/sdb
17:55:50.87964 pvcreate[15739] filters/filter-signature.c:32 filter signature deferred /dev/sdb
17:55:50.87982 pvcreate[15739] filters/filter-md.c:101 filter md deferred /dev/sdb
17:55:50.87999 pvcreate[15739] filters/filter-persistent.c:125 filter cache deferred /dev/sdb
17:55:50.99973 pvcreate[15739] label/label.c:377 Scan filtering /dev/sdb
17:55:50.101008 pvcreate[15739] filters/filter-md.c:109 md filter full 1 excluding md component /dev/sdb
17:55:50.101022 pvcreate[15739] filters/filter-md.c:111 /dev/sdb: Skipping md component device
17:55:50.101028 pvcreate[15739] filters/filter-persistent.c:134 filter caching bad /dev/sdb
17:55:50.101035 pvcreate[15739] label/label.c:389 /dev/sdb: Not processing filtered
17:55:50.104423 pvcreate[15739] filters/filter-persistent.c:94 /dev/sdb: filter cache skipping (cached bad)
17:55:50.104478 pvcreate[15739] filters/filter-persistent.c:94 /dev/sdb: filter cache skipping (cached bad)
17:55:50.104600 pvcreate[15739] toollib.c:5459 Device /dev/sdb excluded by a filter.
```

from above info, there is a key output:
```
filters/filter-md.c:109 md filter full 1 excluding md component /dev/sdb
```
It will help developer to locate the rootcause: it's not issue/error, /dev/sdb just a md dev. pvcreate doesn't work because there has md metadata.

But these info is mystical & unclear for end user, who only knows there is a filter config in /etc/lvm/lvm.conf. And the end user has no clue what's going on. The end user is expecting some likely useful clue at the first place.

So, in my opinion, I suggest there should be some code improvement for all filter failed info. Some filter failed debug log should convert from debug level to standard output level.

For this pvcreate example, If pvcreate print some thing like, for example, "/dev/sdb" might be has md meta data, and refuse to continue, bla bla, ... It's more readable.

Thanks,

             reply	other threads:[~2020-07-20 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 11:02 heming.zhao [this message]
2020-07-20 17:54 ` David Teigland
2020-07-21  8:37   ` heming.zhao
2020-10-15 15:05   ` heming.zhao
2020-10-15 15:16     ` David Teigland
2020-10-15 15:40       ` heming.zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b482a655-342c-86f9-085d-e09a1ffe8bb0@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --subject='Re: [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).