Closed g0tar closed 1 year ago
Both pv_major and pv_minor are of type string, but apparently they're not treated properly in selection - they seem to be the string composed of single character with the code equal to their value. I guess this is not how it's supposed to work:
# vgs -o +pv_major,pv_minor -S "pv_minor =~ '^"`printf "\x02"`"$'" VG #PV #LV #SN Attr VSize VFree Maj Min hdA 1 9 0 wz--n- <920.00g <713.81g 8 2 # vgs -o +pv_major,pv_minor -S "pv_minor =~ '^"`printf "\x12"`"$'" VG #PV #LV #SN Attr VSize VFree Maj Min hdB 1 9 0 wz--n- <920.00g <695.81g 8 18
I would expect them either to be numbers (-S "pv_minor = 2") or be strings with plain values (-S "pv_minor =~ '^18$'").
-S "pv_minor = 2"
-S "pv_minor =~ '^18$'"
As a side note - can I match the "major:minor" pair given in that format somehow?
Thanks for the report!
The report types for pv_major and pv_minor were incorrect, this is now fixed with: 0e9fe27
We don't report PV's major:minor as a pair, just the separate pv_major and pv_minor fields.
Both pv_major and pv_minor are of type string, but apparently they're not treated properly in selection - they seem to be the string composed of single character with the code equal to their value. I guess this is not how it's supposed to work:
I would expect them either to be numbers (
-S "pv_minor = 2"
) or be strings with plain values (-S "pv_minor =~ '^18$'"
).As a side note - can I match the "major:minor" pair given in that format somehow?