diff --git a/WHATS_NEW b/WHATS_NEW index 996f1a2f2..448f3064e 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.98 - ================================= + Add (p)artial attribute to lvs. Don't try to issue discards to a missing PV to avoid segfault. Prevent lvremove from removing LVs that have any part missing. Clear LV_NOSYNCED flag when a RAID1 LV is converted to a linear LV. diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 003e18d65..33e3270e3 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -377,7 +377,7 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv) struct lv_segment *seg; char *repstr; - if (!(repstr = dm_pool_zalloc(mem, 9))) { + if (!(repstr = dm_pool_zalloc(mem, 10))) { log_error("dm_pool_alloc failed"); return 0; } @@ -496,6 +496,11 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv) else repstr[7] = '-'; + if (lv->status & PARTIAL_LV) + repstr[8] = 'p'; + else + repstr[8] = '-'; + out: return repstr; } diff --git a/man/lvs.8.in b/man/lvs.8.in index 97e187993..f31256cc3 100644 --- a/man/lvs.8.in +++ b/man/lvs.8.in @@ -157,6 +157,9 @@ Snapshots using the original device-mapper driver appear as (s); whereas snapshots of thin volumes using the new thin provisioning driver appear as (t). .IP 8 3 Newly-allocated data blocks are overwritten with blocks of (z)eroes before use. +.IP 9 3 +(p)artial: One or more of the Physical Volumes this Logical Volume uses is +missing from the system. .RE .TP .BR \-O ", " \-\-sort