Hide Forgot
This feature got into 6.6 with lvm2 v2.02.107. I'm cloning this feature bug for 6.6 and QA to test this/comment on this. +++ This bug was initially created as a clone of Bug #867376 +++ --- Additional comment from Peter Rajnoha on 2014-06-24 09:15:14 CEST --- The final released version looks like this (lvm2 v2.02.107/libdevmapper v1.02.86): pvs/vgs/lvs/pvdisplay/vgdisplay/lvdisplay/lvm devtypes -S SELECTION # pvs -S help Selection operands ------------------ field - Reporting field. number - Non-negative integer value. size - Floating point value with units, 'm' unit used by default if not specified. percent - Non-negative integer with or without % suffix. string - Characters quoted by ' or " or unquoted. string list - Strings enclosed by [ ] and elements delimited by either "all items must match" or "at least one item must match" operator. regular expression - Characters quoted by ' or " or unquoted. Reserved values --------------- -1, undefined, undef, unknown - Reserved value for undefined numeric value. [number] unmanaged - Reserved value for unmanaged number of metadata copies in VG. [number] auto - Reserved value for size that is automatically calculated. [size] Selection operators ------------------- Comparison operators: =~ - Matching regular expression. [regex] !~ - Not matching regular expression. [regex] = - Equal to. [number, size, percent, string, string list] != - Not equal to. [number, size, percent, string, string_list] >= - Greater than or equal to. [number, size, percent] > - Greater than. [number, size, percent] <= - Less than or equal to. [number, size, percent] < - Less than. [number, size, percent] Logical and grouping operators: && - All fields must match , - All fields must match || - At least one field must match # - At least one field must match ! - Logical negation ( - Left parenthesis ) - Right parenthesis [ - List start ] - List end (the reserved values are specific to the tool, e.g. dmsetup doesn't define any of these reserved values) From man lvm (8): Informal grammar specification: STATEMENT = column cmp_op VALUE | STATEMENT log_op STATEMENT | (STATEMENT) | !(STATEMENT) VALUE = [VALUE log_op VALUE] For list-based types: string list. The log_op must always be of one type within the whole list value. VALUE = value For scalar types: number (integer), size (floating point number with size unit suffix), percent (floating point number with or without % suffix), string.
There's quite extensive test in LVM test suite already: https://git.fedorahosted.org/cgit/lvm2.git/tree/test/shell/report-select.sh
Marking verified (Sanity Only), I went through a few of these and verified that they work. We'll try and integrate this into our tests for even more regression coverage in the future. 2.6.32-495.el6.x86_64 lvm2-2.02.109-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 lvm2-libs-2.02.109-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 lvm2-cluster-2.02.109-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 udev-147-2.57.el6 BUILT: Thu Jul 24 08:48:47 CDT 2014 device-mapper-1.02.88-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 device-mapper-libs-1.02.88-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 device-mapper-event-1.02.88-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 device-mapper-event-libs-1.02.88-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014 device-mapper-persistent-data-0.3.2-1.el6 BUILT: Fri Apr 4 08:43:06 CDT 2014 cmirror-2.02.109-1.el6 BUILT: Tue Aug 5 10:36:23 CDT 2014
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. http://rhn.redhat.com/errata/RHBA-2014-1387.html