linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user
@ 2020-07-20 11:02 heming.zhao
  2020-07-20 17:54 ` David Teigland
  0 siblings, 1 reply; 6+ messages in thread
From: heming.zhao @ 2020-07-20 11:02 UTC (permalink / raw)
  To: linux-lvm

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,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-15 15:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 11:02 [linux-lvm] Suggestion: lvm2 filters lib needs to show some readable info for end user heming.zhao
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

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).