Version 2.02.144 -
=====================================
+ Only show (u)sed pv_attr char when PV is not (a)llocatable. (2.02.143)
Update makefile to generate lcov output also for lvmpolld and lvmlockd.
Fix SystemdService lvm2-lvmdbusd.service name.
Improve support for env LVM_VG_NAME for reference VG name in lvconvert.
char *repstr;
int used = is_used_pv(pv);
- if (!(repstr = dm_pool_zalloc(mem, 5))) {
+ if (!(repstr = dm_pool_zalloc(mem, 4))) {
log_error("dm_pool_alloc failed");
return NULL;
}
- repstr[0] = (pv->status & ALLOCATABLE_PV) ? 'a' : '-';
+ /*
+ * An allocatable PV is always used, so we don't need to show 'u'.
+ */
+ repstr[0] = (pv->status & ALLOCATABLE_PV) ? 'a' : (used > 0) ? 'u' : '-';
repstr[1] = (pv->status & EXPORTED_VG) ? 'x' : '-';
repstr[2] = (pv->status & MISSING_PV) ? 'm' : '-';
- repstr[3] = used <= 0 ? '-' : 'u';
return repstr;
}
With \fB\-\-segments\fP, any "pvseg_" prefixes are optional; otherwise any
"pv_" prefixes are optional. Columns mentioned in \fBvgs\fP(8) can also
be chosen. The pv_attr bits are: (a)llocatable, e(x)ported, (m)issing and
-(u)sed.
+(u)sed (but not allocatable).
.TP
.B \-\-segments
Produces one line of output for each contiguous allocation of space on each
# check 'allocatable' pv attribute
pvcreate "$dev1"
-check pv_field "$dev1" pv_attr ----
+check pv_field "$dev1" pv_attr ---
vgcreate $vg1 "$dev1"
-check pv_field "$dev1" pv_attr a--u
+check pv_field "$dev1" pv_attr a--
pvchange --allocatable n "$dev1"
-check pv_field "$dev1" pv_attr ---u
+check pv_field "$dev1" pv_attr u--
vgremove -ff $vg1
not pvchange --allocatable y "$dev1"
pvremove -ff "$dev1"
# "vgchange disable/enable allocation for pvs with metadatacopies = $mda (bz452982)"
pvchange "$dev1" -x n
pvchange "$dev1" -x n # already disabled
- check pv_field "$dev1" pv_attr ---u
+ check pv_field "$dev1" pv_attr u--
pvchange "$dev1" -x y
pvchange "$dev1" -x y # already enabled
- check pv_field "$dev1" pv_attr a--u
+ check pv_field "$dev1" pv_attr a--
# check we are able to change number of managed metadata areas
if test $mda -gt 0 ; then