mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix pvs -a for segmented output
# pvs -a -o devices Volume group name (null) has invalid characters Skipping volume group (null) ... _pvsegs_sub_single creates fake vg, we need to check that pv is real here.
This commit is contained in:
parent
96bfa40b47
commit
81c7482974
@ -1,5 +1,6 @@
|
||||
Version 2.02.46 -
|
||||
================================
|
||||
Fix pvs -a output to not read volume groups from non-PV devices.
|
||||
Add MMC (mmcblk) device type to filters.
|
||||
Introduce memory pools per volume group (to reduce memory for large VGs).
|
||||
Add memory pool leaks detection.
|
||||
|
@ -89,7 +89,7 @@ FIELD(SEGS, seg, NUM, "Start", list, 5, segstartpe, "seg_start_pe", "Offset with
|
||||
FIELD(SEGS, seg, NUM, "SSize", list, 5, segsize, "seg_size", "Size of segment in current units.")
|
||||
FIELD(SEGS, seg, STR, "Seg Tags", tags, 8, tags, "seg_tags", "Tags, if any.")
|
||||
FIELD(SEGS, seg, STR, "PE Ranges", list, 9, peranges, "seg_pe_ranges", "Ranges of Physical Extents of underlying devices in command line format.")
|
||||
FIELD(SEGS, seg, STR, "Devices", list, 5, devices, "devices", "Underlying devices used with starting extent numbers.")
|
||||
FIELD(SEGS, seg, STR, "Devices", list, 7, devices, "devices", "Underlying devices used with starting extent numbers.")
|
||||
|
||||
FIELD(PVSEGS, pvseg, NUM, "Start", pe, 5, uint32, "pvseg_start", "Physical Extent number of start of segment.")
|
||||
FIELD(PVSEGS, pvseg, NUM, "SSize", len, 5, uint32, "pvseg_size", "Number of extents in segment.")
|
||||
|
@ -376,7 +376,7 @@ int process_each_segment_in_pv(struct cmd_context *cmd,
|
||||
int ret;
|
||||
struct volume_group *old_vg = vg;
|
||||
|
||||
if (!vg && !is_orphan(pv)) {
|
||||
if (is_pv(pv) && !vg && !is_orphan(pv)) {
|
||||
vg_name = pv_vg_name(pv);
|
||||
|
||||
if (!(vg = vg_lock_and_read(cmd, vg_name, NULL, LCK_VG_READ,
|
||||
|
Loading…
Reference in New Issue
Block a user