1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha ed002ed22a dev: also count with suffixes in UUID for LVs when constructing VGID and LVID index
UUID for LV is either "LVM-<vg_uuid><lv_uuid>" or "LVM-<vg_uuid><lv_uuid>-<suffix>".
The code before just checked the length of the UUID based on the first
template, not the variant with suffix - so LVs with this suffix were not
processed properly.

For example a thin pool LV (as an example of an LV that contains
sub LVs where UUIDs have suffixes):

[0] fedora/~ # lsblk -s /dev/vg/lvol1
NAME              MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vg-lvol1          253:8    0    4M  0 lvm
`-vg-pool-tpool   253:6    0  116M  0 lvm
  |-vg-pool_tmeta 253:2    0    4M  0 lvm
  | `-sda           8:0    0  128M  0 disk
  `-vg-pool_tdata 253:3    0  116M  0 lvm
    `-sda           8:0    0  128M  0 disk

Before this patch (spurious warning message about device mismatch):

[0] fedora/~ # pvs
  WARNING: Device mismatch detected for vg/lvol1 which is accessing /dev/mapper/vg-pool-tpool instead of (null).
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda   vg     lvm2 a--  124.00m    0

With this patch applied (no spurious warning message about device mismatch):

[0] fedora/~ # pvs
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda   vg     lvm2 a--  124.00m    0
2016-03-22 10:52:24 +01:00
..
activate cache: check for cache fail during flush 2016-03-10 18:38:53 +01:00
cache cleanup: drop unneeded test 2016-02-25 23:30:25 +01:00
cache_segtype metadata: add support for interconnection of thin pool LV segment with indirect origin 2016-03-03 13:46:40 +01:00
commands dbus: add notification from commands 2016-03-07 10:06:09 -06:00
config remove unused define 2016-03-09 13:38:04 -06:00
datastruct doc: change fsf address 2016-01-21 12:11:37 +01:00
device dev: also count with suffixes in UUID for LVs when constructing VGID and LVID index 2016-03-22 10:52:24 +01:00
display commands: lvdisplay: recognize -H|--history switch 2016-03-04 10:27:45 +01:00
error doc: change fsf address 2016-01-21 12:11:37 +01:00
filters filter: do not check for suspended devs in filter-usable in lvmetad mode 2016-02-03 14:57:36 +01:00
format1 redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_pool redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_text gcc: cast time_t to 64bit 2016-03-10 18:38:54 +01:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label doc: change fsf address 2016-01-21 12:11:37 +01:00
locking lvmlockd: fix sparse snapshot case 2016-02-23 15:45:25 -06:00
log dbus: add notification from commands 2016-03-07 10:06:09 -06:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata metadata: use own mem pool to report PV device mismatch in VG 2016-03-21 14:39:11 +01:00
mirror doc: change fsf address 2016-01-21 12:11:37 +01:00
misc pvs: replace 'unknown device' with [unknown] 2016-03-01 11:12:03 -06:00
mm doc: change fsf address 2016-01-21 12:11:37 +01:00
notify vgscan: add --notifydbus to send a notification 2016-03-07 10:50:45 -06:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
replicator doc: change fsf address 2016-01-21 12:11:37 +01:00
report report: Add pv_major, pv_minor to reports. 2016-03-22 00:12:08 +00:00
snapshot doc: change fsf address 2016-01-21 12:11:37 +01:00
striped doc: change fsf address 2016-01-21 12:11:37 +01:00
thin metadata: add support for interconnection of thin pool LV segment with indirect origin 2016-03-03 13:46:40 +01:00
unknown doc: change fsf address 2016-01-21 12:11:37 +01:00
uuid doc: change fsf address 2016-01-21 12:11:37 +01:00
zero doc: change fsf address 2016-01-21 12:11:37 +01:00
Makefile.in dbus: add notification from commands 2016-03-07 10:06:09 -06:00