summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2012-09-19 12:49:40 +0100
committerAlasdair G Kergon <agk@redhat.com>2012-09-19 12:49:40 +0100
commit290ae4791ef5eedaae2bc1cfa3645ac8073faf54 (patch)
tree17445e9fcd525dbb48e965411ca0cbbe3fd732be
parentb737ff01e4038d45798521448dc4ae4864d1b29a (diff)
downloadlvm2-290ae4791ef5eedaae2bc1cfa3645ac8073faf54.tar.gz
lvm2-290ae4791ef5eedaae2bc1cfa3645ac8073faf54.tar.xz
lvm2-290ae4791ef5eedaae2bc1cfa3645ac8073faf54.zip
lvs: add partial attribute
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/metadata/lv.c7
-rw-r--r--man/lvs.8.in3
3 files changed, 10 insertions, 1 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 996f1a2f..448f3064 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 003e18d6..33e3270e 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 97e18799..f31256cc 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