linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Error on RegEx with lv_tags-fields
@ 2018-07-09 12:32 Oliver Rath
  2018-07-10  7:55 ` Damon Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Rath @ 2018-07-09 12:32 UTC (permalink / raw)
  To: LVM general discussion and development

Hi list,

Im trying to sort some output with lvs using a regex "=~", which results
in an error:

# lvs -o lv_name,lv_tags -S 'lv_tags=~mac1'
  dm_report: incompatible comparison type for selection field lv_tags

Otherwise, using the =~ operator on lv_names works well:

# lvs -o lv_name -S 'lv_name=~z'
  LV 
  z1 
  z2 
  z3 

If I see right, I can use the selection type "string list" here, but no
regex. Is this right? Is there a way to use regex on tags? Im looking
for a way doing

  "show me all lv's with tags beginning with "abc.."

TfH!

Oliver

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

* Re: [linux-lvm] Error on RegEx with lv_tags-fields
  2018-07-09 12:32 [linux-lvm] Error on RegEx with lv_tags-fields Oliver Rath
@ 2018-07-10  7:55 ` Damon Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Damon Wang @ 2018-07-10  7:55 UTC (permalink / raw)
  To: LVM general discussion and development

I have meet same problem, now I use grep :-D

Damon


Oliver Rath <rath@mglug.de> 于2018年7月9日周一 下午8:33写道:
>
> Hi list,
>
> Im trying to sort some output with lvs using a regex "=~", which results
> in an error:
>
> # lvs -o lv_name,lv_tags -S 'lv_tags=~mac1'
>   dm_report: incompatible comparison type for selection field lv_tags
>
> Otherwise, using the =~ operator on lv_names works well:
>
> # lvs -o lv_name -S 'lv_name=~z'
>   LV
>   z1
>   z2
>   z3
>
> If I see right, I can use the selection type "string list" here, but no
> regex. Is this right? Is there a way to use regex on tags? Im looking
> for a way doing
>
>   "show me all lv's with tags beginning with "abc.."
>
> TfH!
>
> Oliver
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

* Re: [linux-lvm] Error on RegEx with lv_tags-fields
  2018-07-09  9:11 Oliver Rath
@ 2018-07-10  8:50 ` Peter Rajnoha
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Rajnoha @ 2018-07-10  8:50 UTC (permalink / raw)
  To: Oliver Rath; +Cc: LVM general discussion and development

On 07/09/2018 11:11 AM, Oliver Rath wrote:
> Hi list,
> 
> Im trying to sort some output with lvs using a regex "=~", which results
> in an error:
> 
> # lvs -o lv_name,lv_tags -S 'lv_tags=~mac1'
>   dm_report: incompatible comparison type for selection field lv_tags
> 
> Otherwise, using the =~ operator on lv_names works well:
> 
> # lvs -o lv_name -S 'lv_name=~z'
>   LV 
>   z1 
>   z2 
>   z3 
> 
> If I see right, I can use the selection type "string list" here, but no
> regex. Is this right? Is there a way to use regex on tags?
> 

This is not supported yet... but I think we should be able to extend the
functionality here. You can file an upstream report for that if you want
(https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper)
and if there's time/resources, we may add that functionality.

> TfH!
> 
> Oliver
> 
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 


-- 
Peter

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

* [linux-lvm] Error on RegEx with lv_tags-fields
@ 2018-07-09  9:11 Oliver Rath
  2018-07-10  8:50 ` Peter Rajnoha
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Rath @ 2018-07-09  9:11 UTC (permalink / raw)
  To: LVM general discussion and development

Hi list,

Im trying to sort some output with lvs using a regex "=~", which results
in an error:

# lvs -o lv_name,lv_tags -S 'lv_tags=~mac1'
  dm_report: incompatible comparison type for selection field lv_tags

Otherwise, using the =~ operator on lv_names works well:

# lvs -o lv_name -S 'lv_name=~z'
  LV 
  z1 
  z2 
  z3 

If I see right, I can use the selection type "string list" here, but no
regex. Is this right? Is there a way to use regex on tags?

TfH!

Oliver

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

end of thread, other threads:[~2018-07-10  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-09 12:32 [linux-lvm] Error on RegEx with lv_tags-fields Oliver Rath
2018-07-10  7:55 ` Damon Wang
  -- strict thread matches above, loose matches on Subject: below --
2018-07-09  9:11 Oliver Rath
2018-07-10  8:50 ` Peter Rajnoha

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