master - tests: lowering disc usage
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e5ec348d680ff8...
Commit: e5ec348d680ff8ea0aa1e751d13cdab5812eb672
Parent: 454b891f6d0c482cd6c1655dc4e5c7eeee321d32
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 9 17:12:10 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 9 20:55:00 2016 +0200
tests: lowering disc usage
Correction for aux test result ([] -> if;then;fi)
Use issue_discard to lower memory demands on discardable test devices
Use large devices directly through prepare_pvs
I'm still observing more then 0.5G of data usage through.
Particullary:
'lvcreate' followed by 'lvconvert' (which doesn't yet support --nosync
option) is quite demanging, and resume returns quite 'late' when
a lot of data has been already written on PV.
---
test/shell/lvcreate-large-raid.sh | 59 ++++++++++++++++--------------------
1 files changed, 26 insertions(+), 33 deletions(-)
diff --git a/test/shell/lvcreate-large-raid.sh b/test/shell/lvcreate-large-raid.sh
index 24f4fb8..c2e9b7e 100644
--- a/test/shell/lvcreate-large-raid.sh
+++ b/test/shell/lvcreate-large-raid.sh
@@ -21,27 +21,17 @@ aux can_use_16T || skip
aux have_raid 1 3 0 || skip
-aux prepare_vg 5 32
+# Prepare 5x ~1P sized devices
+aux prepare_pvs 5 1000000000
-# Fake 5 PiB volume group $vg1 via snapshot LVs
-for device in "$lv1" "$lv2" "$lv3" "$lv4" "$lv5"
-do
- lvcreate --type snapshot -s -l 20%FREE -n $device $vg --virtualsize 1P
-done
-
-#FIXME this should be 1024T
-#check lv_field $vg/$lv size "128.00m"
-
-aux extend_filter_LVMTEST
+vgcreate $vg1 $(< DEVICES)
-pvcreate "$DM_DEV_DIR"/$vg/$lv[12345]
-vgcreate -s 2M $vg1 "$DM_DEV_DIR"/$vg/$lv[12345]
+aux lvmconf 'devices/issue_discards = 1'
-# Delay PVs so that resynchronization doesn't fill
-# the snapshots before removal of the RaidLV
-for device in "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
+# Delay PVs so that resynchronization doesn't fill too much space
+for device in $(< DEVICES)
do
- aux delay_dev "$device" 0 1
+ aux delay_dev "$device" 0 10 $(get first_extent_sector "$device")
done
# bz837927 START
@@ -70,15 +60,30 @@ for segtype in raid4 raid5; do
lvremove -ff $vg1
done
-# 750 TiB raid6 (with --nosync rejection check)
-[ aux have_raid 1 9 0 ] && not lvcreate --type raid6 -i 3 -L 750T -n $lv1 $vg1 --nosync
+#
+# Extending large 200 TiB RAID LV to 400 TiB (belong in different script?)
+#
+lvcreate --type raid1 -m 1 -L 200T -n $lv1 $vg1 --nosync
+check lv_field $vg1/$lv1 size "200.00t"
+aux check_status_chars $vg1 $lv1 "AA"
+lvextend -L +200T $vg1/$lv1
+check lv_field $vg1/$lv1 size "400.00t"
+aux check_status_chars $vg1 $lv1 "AA"
+lvremove -ff $vg1
+
+
+# Check --nosync is rejected for raid6
+if aux have_raid 1 9 0 ; then
+ not lvcreate --type raid6 -i 3 -L 750T -n $lv1 $vg1 --nosync
+fi
+
+# 750 TiB raid6
lvcreate --type raid6 -i 3 -L 750T -n $lv1 $vg1
check lv_field $vg1/$lv1 size "750.00t"
aux check_status_chars $vg1 $lv1 "aaaaa"
lvremove -ff $vg1
-# 1 PiB raid6 (with --nosync rejection check), then extend up to 2 PiB
-[ aux have_raid 1 9 0 ] && not lvcreate --type raid6 -i 3 -L -L 1P -n $lv1 $vg1 --nosync
+# 1 PiB raid6, then extend up to 2 PiB
lvcreate --type raid6 -i 3 -L 1P -n $lv1 $vg1
check lv_field $vg1/$lv1 size "1.00p"
aux check_status_chars $vg1 $lv1 "aaaaa"
@@ -96,18 +101,6 @@ check lv_field $vg1/$lv1 size "200.00t"
aux check_status_chars $vg1 $lv1 "aa"
lvremove -ff $vg1
-#
-# Extending large 200 TiB RAID LV to 400 TiB (belong in different script?)
-#
-lvcreate --type raid1 -m 1 -L 200T -n $lv1 $vg1 --nosync
-check lv_field $vg1/$lv1 size "200.00t"
-aux check_status_chars $vg1 $lv1 "AA"
-lvextend -L +200T $vg1/$lv1
-check lv_field $vg1/$lv1 size "400.00t"
-aux check_status_chars $vg1 $lv1 "AA"
-lvremove -ff $vg1
-
# bz837927 END
vgremove -ff $vg1
-vgremove -ff $vg
7 years, 7 months
master - cache: fix reporting of dirty cache
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=454b891f6d0c48...
Commit: 454b891f6d0c482cd6c1655dc4e5c7eeee321d32
Parent: 9350aa72184e08da0faa5f1fda2f245e6342a426
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 9 20:45:37 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 9 20:53:36 2016 +0200
cache: fix reporting of dirty cache
When cache has zero used blocks it's been wrongly reported as 100.00% dirty.
Fix it and report 0.00.
---
WHATS_NEW | 1 +
lib/activate/dev_manager.c | 5 +++--
lib/metadata/lv.c | 5 +++--
test/shell/lvcreate-cache.sh | 6 +++---
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 2c47452..46e0c1a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.166 -
=====================================
+ Report 0% as dirty (copy%) for cache without any used block.
Fix lvm2api reporting of cache data and metadata percent.
Restore reporting of metadata usage for cache volumes (2.02.155).
Support raid scrubbing on cache origin LV.
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 233a216..9fbd689 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -1432,8 +1432,9 @@ int dev_manager_cache_status(struct dev_manager *dm,
c->total_blocks);
(*status)->metadata_usage = dm_make_percent(c->metadata_used_blocks,
c->metadata_total_blocks);
- (*status)->dirty_usage = dm_make_percent(c->dirty_blocks,
- c->used_blocks);
+ (*status)->dirty_usage = (s->cache->used_blocks) ?
+ dm_make_percent(c->dirty_blocks,
+ c->used_blocks) : DM_PERCENT_0;
}
r = 1;
out:
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 9ee67b4..33129e3 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -366,8 +366,9 @@ dm_percent_t lvseg_percent_with_info_and_seg_status(const struct lv_with_info_an
else {
switch (type) {
case PERCENT_GET_DIRTY:
- p = dm_make_percent(s->cache->dirty_blocks,
- s->cache->used_blocks);
+ p = (s->cache->used_blocks) ?
+ dm_make_percent(s->cache->dirty_blocks,
+ s->cache->used_blocks) : DM_PERCENT_0;
break;
case PERCENT_GET_METADATA:
p = dm_make_percent(s->cache->metadata_used_blocks,
diff --git a/test/shell/lvcreate-cache.sh b/test/shell/lvcreate-cache.sh
index 52d36a1..c53d243 100644
--- a/test/shell/lvcreate-cache.sh
+++ b/test/shell/lvcreate-cache.sh
@@ -85,15 +85,15 @@ lvremove -f $vg
lvcreate --type cache-pool -L1 $vg/cpool
lvcreate -H -L4 -n $lv1 $vg/cpool
-check lv_field $vg/$lv1 copy_percent "100.00"
+check lv_field $vg/$lv1 copy_percent "0.00"
check lv_field $vg/$lv1 data_percent "0.00"
check lv_field $vg/$lv1 metadata_percent "0.78"
-check lv_field $vg/cpool copy_percent "100.00"
+check lv_field $vg/cpool copy_percent "0.00"
check lv_field $vg/cpool data_percent "0.00"
check lv_field $vg/cpool metadata_percent "0.78"
# check we also display percent value for segmented output (-o+devices)
lvs -a -o+devices $vg/cpool | tee out
-grep "100.00" out
+grep "0.00" out
lvremove -f $vg
7 years, 7 months
master - lvm2app: fix cache percantage reporting
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9350aa72184e08...
Commit: 9350aa72184e08da0faa5f1fda2f245e6342a426
Parent: 4b22cd81e6b3b60f08976df4104b7411d1af4fc5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 9 14:25:53 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 9 15:03:28 2016 +0200
lvm2app: fix cache percantage reporting
In lvm2app we were always returning dirty (copy%) value.
Return properly data & metadata usage values.
---
WHATS_NEW | 1 +
lib/report/properties.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 9584872..2c47452 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.166 -
=====================================
+ Fix lvm2api reporting of cache data and metadata percent.
Restore reporting of metadata usage for cache volumes (2.02.155).
Support raid scrubbing on cache origin LV.
diff --git a/lib/report/properties.c b/lib/report/properties.c
index d3feb07..3b27bdc 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -114,7 +114,7 @@ static dm_percent_t _data_percent(const struct logical_volume *lv)
stack;
return DM_PERCENT_INVALID;
}
- percent = status->dirty_usage;
+ percent = status->data_usage;
dm_pool_destroy(status->mem);
return percent;
}
@@ -135,7 +135,7 @@ static dm_percent_t _metadata_percent(const struct logical_volume *lv)
stack;
return DM_PERCENT_INVALID;
}
- percent = status->dirty_usage;
+ percent = status->metadata_usage;
dm_pool_destroy(status->mem);
return percent;
}
7 years, 7 months
master - cache: report metadata percentage
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4b22cd81e6b3b6...
Commit: 4b22cd81e6b3b60f08976df4104b7411d1af4fc5
Parent: a13440d7ca4268eeede9986223d31e33122e753a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Sep 9 14:24:49 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Sep 9 15:01:35 2016 +0200
cache: report metadata percentage
Reinstantiate reporting of metadata percent usage for cache volumes.
Also show the same percentage with hidden cache-pool LV.
This regression was caused by optimization for a single-ioctl in
2.02.155.
---
WHATS_NEW | 1 +
lib/metadata/segtype.h | 1 +
lib/report/report.c | 1 +
test/shell/lvcreate-cache.sh | 16 ++++++++++++++++
tools/reporter.c | 14 +++++++++++++-
5 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index c594723..9584872 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.166 -
=====================================
+ Restore reporting of metadata usage for cache volumes (2.02.155).
Support raid scrubbing on cache origin LV.
Version 2.02.165 - 7th September 2016
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 2fafa19..9ca740d 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -153,6 +153,7 @@ struct dev_manager;
#define seg_is_striped_target(seg) segtype_is_striped_target((seg)->segtype)
#define seg_is_cache(seg) segtype_is_cache((seg)->segtype)
#define seg_is_cache_pool(seg) segtype_is_cache_pool((seg)->segtype)
+#define seg_is_used_cache_pool(seg) (seg_is_cache_pool(seg) && (!dm_list_empty(&(seg->lv)->segs_using_this_lv)))
#define seg_is_linear(seg) (seg_is_striped(seg) && ((seg)->area_count == 1))
#define seg_is_mirror(seg) segtype_is_mirror((seg)->segtype)
#define seg_is_mirrored(seg) segtype_is_mirrored((seg)->segtype)
diff --git a/lib/report/report.c b/lib/report/report.c
index ea36795..1ca4dfb 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -2939,6 +2939,7 @@ static int _metadatapercent_disp(struct dm_report *rh,
dm_percent_t percent = DM_PERCENT_INVALID;
if (lv_is_thin_pool(lvdm->lv) ||
+ lv_is_cache(lvdm->lv) ||
lv_is_used_cache_pool(lvdm->lv))
percent = lvseg_percent_with_info_and_seg_status(lvdm, PERCENT_GET_METADATA);
diff --git a/test/shell/lvcreate-cache.sh b/test/shell/lvcreate-cache.sh
index fbea5b8..52d36a1 100644
--- a/test/shell/lvcreate-cache.sh
+++ b/test/shell/lvcreate-cache.sh
@@ -81,6 +81,22 @@ check lv_field $vg/pool7 segtype "cache-pool"
lvremove -f $vg
+# Check the percentage values are reported for both cache and cache-pool
+lvcreate --type cache-pool -L1 $vg/cpool
+lvcreate -H -L4 -n $lv1 $vg/cpool
+
+check lv_field $vg/$lv1 copy_percent "100.00"
+check lv_field $vg/$lv1 data_percent "0.00"
+check lv_field $vg/$lv1 metadata_percent "0.78"
+check lv_field $vg/cpool copy_percent "100.00"
+check lv_field $vg/cpool data_percent "0.00"
+check lv_field $vg/cpool metadata_percent "0.78"
+# check we also display percent value for segmented output (-o+devices)
+lvs -a -o+devices $vg/cpool | tee out
+grep "100.00" out
+lvremove -f $vg
+
+
# Validate ambiguous pool name is detected
invalid lvcreate -l 1 --type cache-pool --cachepool pool1 $vg/pool2
invalid lvcreate -l 1 --type cache-pool --name pool3 --cachepool pool4 $vg
diff --git a/tools/reporter.c b/tools/reporter.c
index 0df22ff..b7a2f39 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -89,6 +89,12 @@ static int _vgs_single(struct cmd_context *cmd __attribute__((unused)),
static void _choose_lv_segment_for_status_report(const struct logical_volume *lv, const struct lv_segment **lv_seg)
{
+ if (lv_is_used_cache_pool(lv)) {
+ /* For a used cache pool, choose cache volume segment */
+ *lv_seg = get_only_segment_using_this_lv(lv);
+ return;
+ }
+
/*
* By default, take the first LV segment to report status for.
* If there's any other specific segment that needs to be
@@ -115,8 +121,9 @@ static int _do_info_and_status(struct cmd_context *cmd,
if (do_status) {
if (!(status->seg_status.mem = dm_pool_create("reporter_pool", 1024)))
return_0;
- if (!lv_seg)
+ if (!lv_seg || seg_is_used_cache_pool(lv_seg))
_choose_lv_segment_for_status_report(lv, &lv_seg);
+
if (do_info) {
/* both info and status */
status->info_ok = lv_info_with_seg_status(cmd, lv, lv_seg, use_layer, status, 1, 1);
@@ -124,6 +131,11 @@ static int _do_info_and_status(struct cmd_context *cmd,
if (use_layer && status->info_ok &&
!lv_info(cmd, lv, 0, NULL, 0, 0))
memset(&status->info, 0, sizeof(status->info));
+ /* for inactive cache reset lvinfo for its struct for cache-pool */
+ if (lv_is_used_cache_pool(lv) && !status->info_ok) {
+ memset(&status->info, 0, sizeof(status->info));
+ status->info_ok = 1;
+ }
} else
/* status only */
status->info_ok = lv_status(cmd, lv_seg, use_layer, &status->seg_status);
7 years, 7 months
master - tests: lower allocated memory
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a13440d7ca4268...
Commit: a13440d7ca4268eeede9986223d31e33122e753a
Parent: 6064a5084e2a71db389b1bdf06c05765610295d9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 7 16:43:42 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 7 16:43:42 2016 +0200
tests: lower allocated memory
Use smaller mirror to have faster sync.
TODO: switch to delayed devs...
---
test/shell/lvconvert-raid-takeover.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/lvconvert-raid-takeover.sh b/test/shell/lvconvert-raid-takeover.sh
index 2ead582..fd327ad 100644
--- a/test/shell/lvconvert-raid-takeover.sh
+++ b/test/shell/lvconvert-raid-takeover.sh
@@ -23,7 +23,7 @@ aux prepare_vg 9 288
# aux delay_dev "$dev1" 0 1
# Create 3-way mirror
-lvcreate --yes --type mirror -m 2 -L 256M -n $lv1 $vg
+lvcreate --yes --type mirror -m 2 -L 64M -n $lv1 $vg
check lv_field $vg/$lv1 segtype "mirror"
check lv_field $vg/$lv1 stripes 3
echo y | mkfs -t ext4 /dev/mapper/$vg-$lv1
7 years, 7 months
master - cleanup: clean gcc6 minor/major types warnings
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6064a5084e2a71...
Commit: 6064a5084e2a71db389b1bdf06c05765610295d9
Parent: 5838c41a356eec05218395e734b90d21487f271c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 7 15:13:48 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 7 16:42:34 2016 +0200
cleanup: clean gcc6 minor/major types warnings
Put sys/sysmacros.h in front of sys/types.h header file as requested
by gcc6 part II.
---
daemons/cmirrord/functions.c | 1 +
.../dmeventd/plugins/snapshot/dmeventd_snapshot.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
index 757d8e8..5e50b8a 100644
--- a/daemons/cmirrord/functions.c
+++ b/daemons/cmirrord/functions.c
@@ -12,6 +12,7 @@
#include "logging.h"
#include "functions.h"
+#include <sys/sysmacros.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
index 7b060ed..a70d07c 100644
--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
@@ -16,6 +16,7 @@
#include "dmeventd_lvm.h"
#include "libdevmapper-event.h"
+#include <sys/sysmacros.h>
#include <sys/wait.h>
#include <stdarg.h>
#include <pthread.h>
7 years, 7 months
master - cache: scrubbing for cache origin LV - Bug 1169495
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5838c41a356eec...
Commit: 5838c41a356eec05218395e734b90d21487f271c
Parent: 01cc0dfae9ec5486fe313c0be4d3bb31e82a0456
Author: Brassow Jonathan <jbrassow(a)redhat.com>
AuthorDate: Tue Sep 6 09:29:14 2016 -0500
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Sep 7 16:42:32 2016 +0200
cache: scrubbing for cache origin LV - Bug 1169495
Allow RAID scrubbing on cache origin sub-LV
This patch adds the ability to perform RAID scrubbing on the cache
origin sub-LV (https://bugzilla.redhat.com/1169495). Cache origin
operations are restricted to non-clustered RAID LVs until there can
be further testing in a cluster (even for exclusive activation).
User can either specify directly _corig LV
or he can specify cache LV and operation --syncation is
passed ONLY to _corig LV.
If users wants to manipulation with cache-pool devices - he
needs to specify this object name.
Signed-off-by: Jonathan Brassow <jbrassow(a)redhat.com>
---
WHATS_NEW | 1 +
test/shell/lvchange-syncaction-raid.sh | 11 +++++++++++
tools/lvchange.c | 29 ++++++++++++++++++++++++++++-
3 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 22f6cee..c594723 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.166 -
=====================================
+ Support raid scrubbing on cache origin LV.
Version 2.02.165 - 7th September 2016
=====================================
diff --git a/test/shell/lvchange-syncaction-raid.sh b/test/shell/lvchange-syncaction-raid.sh
index 1997bc6..2baaaf6 100644
--- a/test/shell/lvchange-syncaction-raid.sh
+++ b/test/shell/lvchange-syncaction-raid.sh
@@ -82,4 +82,15 @@ aux wait_for_sync $vg $lv1
# Retest mistmatch exists
check lv_field $vg/$lv1 raid_mismatch_count "128"
+lvremove -ff $vg
+
+# Bug 1169495 - RFE: allow raid scrubbing on cache origin raid volumes
+# lvcreate RAID1 origin, lvcreate cache-pool, and lvconvert to cache
+# then test that the origin can be scrubbed.
+lvcreate --type raid1 -m 1 --nosync -l 2 -n $lv1 $vg
+lvcreate --type cache-pool -l 1 -n ${lv1}_cachepool $vg
+lvconvert --cache -Zy --cachepool $vg/${lv1}_cachepool $vg/$lv1
+lvchange --syncaction check $vg/${lv1}_corig
+# Check may go too quickly to verify with check of syncaction
+
vgremove -ff $vg
diff --git a/tools/lvchange.c b/tools/lvchange.c
index e0d91fc..4810392 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -1049,6 +1049,18 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
lv_is_virtual_origin(origin = origin_from_cow(lv)))
lv = origin;
+ /* Use cache origin LV for 'raid' actions */
+ if (lv_is_cache(lv) &&
+ arg_from_list_is_set(cmd, NULL,
+ /* FIXME: we want to support more ops here */
+ //resync_ARG,
+ syncaction_ARG,
+ -1)) {
+ lv = seg_lv(first_seg(lv), 0);
+ log_debug("Using cache origin volume %s for lvchange instead.",
+ display_lvname(lv));
+ }
+
if ((lv_is_thin_pool_data(lv) || lv_is_thin_pool_metadata(lv) ||
lv_is_cache_pool_data(lv) || lv_is_cache_pool_metadata(lv)) &&
!arg_is_set(cmd, activate_ARG) &&
@@ -1056,7 +1068,22 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
!arg_is_set(cmd, setactivationskip_ARG))
/* Rest can be changed for stacked thin pool meta/data volumes */
;
- else if (!lv_is_visible(lv) && !lv_is_virtual_origin(lv)) {
+ else if (lv_is_cache_origin(lv) && lv_is_raid(lv)) {
+ if (vg_is_clustered(lv->vg)) {
+ log_error("Unable to change internal LV %s directly in a cluster.",
+ display_lvname(lv));
+ return ECMD_FAILED;
+ }
+ /*
+ * FIXME: For now, we don't want to allow all kinds of
+ * operations on this cache origin sub-LV. We are going
+ * to restrict it to non-clustered, RAID. This way, we
+ * can change the syncaction as needed (e.g. initiate
+ * scrubbing).
+ *
+ * Later pass all 'cache' actions on cache origin.
+ */
+ } else if (!lv_is_visible(lv) && !lv_is_virtual_origin(lv)) {
log_error("Unable to change internal LV %s directly.",
display_lvname(lv));
return ECMD_FAILED;
7 years, 7 months
v2_02_165 annotated tag has been created
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=70633e7a4d5f61...
Commit: 70633e7a4d5f616e4a125b1834e320946b373881
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2016-09-07 01:26 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2016-09-07 01:26 +0000
annotated tag: v2_02_165 has been created
at 70633e7a4d5f616e4a125b1834e320946b373881 (tag)
tagging 3d2b1ff5c4cfbeec36b4ab93dc08e87a252b7fed (commit)
replaces v2_02_164
Release 2.02.165.
An assortment of minor fixes.
65 files changed, 2721 insertions(+), 448 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlfPbOwACgkQIoGRwVZ+LBe4KQCgxt4r/avnkT39lT//8yU6esh0
B6QAoN/sZokVRK4yRcX6OqvivowRO9ef
=OVcM
-----END PGP SIGNATURE-----
Alasdair G Kergon (23):
post-release
tools: Suppress some unnecessary --stripesize warnings.
lib: Move lcm and gcd to lib/misc for wider use.
toollib: Record whether or not stripes/stripe_size args supplied.
lvcreate: No longer adjust --stripes for raid types.
lvcreate: Drop warning messages for number of raid stripes.
lvconvert: Don't allow --repair on raid0 LVs.
lvcreate: Never treat raid0 as linear.
raid: Don't monitor raid0 or raid0_meta LVs.
dmeventd: Fix unmonitoring when segtype changes.
dmeventd: Start merging back replacement unmonitor code.
dmeventd: Simplify replacement unmonitor code.
dmeventd: Add fixed timeout when unmonitoring.
lvconvert: Disallow raid10 mirror conversions.
alloc: Move _log_parallel_areas.
alloc: Record PV tags of parallel PVs in log.
alloc: Avoid PV tags too when avoiding parallel PV allocation.
lvconvert: Fix --splitmirrors segfault with incorrect PV.
raid10: Fix #stripes in lvcreate msg when too many.
config: regenerate
lvmetad: Unused includes.
man: Additional info on exit statuses.
pre-release
David Teigland (8):
man: lvconvert change location of sentence
man: lvconvert mention required option
libdaemon: add errno to error message
lvmetad: use udev to ignore multipath components during scan
man: add lvmraid(7)
man lvmraid: remove rebuild example
man lvmraid: comment out unfinished features
man lvmraid: install
Heinz Mauelshagen (6):
pvmove: prohibit non-resilient collocation of RAID SubLVs
pvmove: fix regression introduced with 8e9d5d12ae3ac75852ebd74b64c28e31abb68d0e
lvcreate: better error message creating RAID LV on < 4 KiB VG extent size
vgsplit: fix regression processing thin external origins
test: add missing lvchange-rebuild-raid.sh
test: delay writes to all test PVs in lvchange-rebuild-raid.sh to avoid race
Peter Rajnoha (8):
libdm: add some comments about DM_UDEV_DISABLE_LIBRARY_FALLBACK flag
conf: fix typo in report/columns_as_rows config option name recognition
tests: also fix typo in report/columns_as_rows in tests
lvmdump: use lsblk -s and lsblk -O in lvmdump only if these options are supported
lvmetad: check udev for mpath component several times if udev record not initialized yet
refactor: move and rename _dev_is_mpath_component in lvmetad.c to udev_dev_is_mpath_component in dev-type.c
dev-type: use more appropriate messages in udev_dev_is_mpath_component and use 10s timeout
dev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initialized fn is not present
Tony Asleson (19):
lvmdbusd: Always fork & exec background commands
lvmdbusd: Add date & ts if running in a terminal
lvmdbusd: Add support for using lvm shell
lvmdbusd: Use udev until ExternalEvent occurs
lvmdbusd: Be more explicit on return values
lvmdbusd: Make job.Percent a double
lvmdbustest.py: Remove '-' from tag ch set
lvmdbusd: Be more specific on return types for Lv
lvmdbusd: Correct return type for empty PeSegments
dbus/testlib.py: Improve type checking
lvmdbusd: Include lvm shell testing as the default
lvmdbusd: Handle different daemon options
test/lib/aux.sh: Remove '--udev' for lvmdbusd start
test/lib/aux.sh: Remove incorrect comment
lvmdbusd: Correct imports
lvmdbusd/lvmdb.py: Make stand alone execution work
lvmdbusd: WS/pep8 corrections
lvmdbustest.py: Add tag regression test
lvmdbusd: Prefix tag string with '@'
Zdenek Kabelac (6):
cache: introduce cache_pool_max_chunks
cache: do not monitor cache-pool
cleanup: clean gcc6 minor/major types warnings
debug: better verbose message
dmeventd: typo and debug name fix
tests: skip test for older cache target
7 years, 7 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=01cc0dfae9ec54...
Commit: 01cc0dfae9ec5486fe313c0be4d3bb31e82a0456
Parent: 3d2b1ff5c4cfbeec36b4ab93dc08e87a252b7fed
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Sep 7 02:34:15 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Sep 7 02:34:15 2016 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 244677c..eb664c4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.165(2)-git (2016-09-07)
+2.02.166(2)-git (2016-09-07)
diff --git a/VERSION_DM b/VERSION_DM
index a993372..55887fc 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.134-git (2016-09-07)
+1.02.135-git (2016-09-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index d80b1ff..22f6cee 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.166 -
+=====================================
+
Version 2.02.165 - 7th September 2016
=====================================
Add lvmraid(7) man page.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index eaead89..edb1e70 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.135 -
+=====================================
+
Version 1.02.134 - 7th September 2016
=====================================
Improve explanation of udev fallback in libdevmapper.h.
7 years, 7 months
master - pre-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3d2b1ff5c4cfbe...
Commit: 3d2b1ff5c4cfbeec36b4ab93dc08e87a252b7fed
Parent: a6bcdbe13c25af3cf4bfd0849342fff5ffd75700
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Sep 7 02:25:51 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Sep 7 02:25:51 2016 +0100
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 8 ++++++--
WHATS_NEW_DM | 5 +++--
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/VERSION b/VERSION
index 58f1a65..244677c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.165(2)-git (2016-08-15)
+2.02.165(2)-git (2016-09-07)
diff --git a/VERSION_DM b/VERSION_DM
index 7cfcd9a..a993372 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.134-git (2016-08-15)
+1.02.134-git (2016-09-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4cee0e4..d80b1ff 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,8 +1,10 @@
-Version 2.02.165 -
-===================================
+Version 2.02.165 - 7th September 2016
+=====================================
+ Add lvmraid(7) man page.
Use udev db to check for mpath components before running pvscan for lvmetad.
Use lsblk -s and lsblk -O in lvmdump only if these options are supported.
Fix number of stripes shown in lvcreate raid10 message when too many.
+ Change lvmdbusd to use new lvm shell facilities.
Do not monitor cache-pool metadata when LV is just being cleared.
Add allocation/cache_pool_max_chunks to prevent misuse of cache target.
Give error not segfault in lvconvert --splitmirrors when PV lies outside LV.
@@ -13,6 +15,8 @@ Version 2.02.165 -
Don't allow lvconvert --repair on raid0 devices or attempt to monitor them.
No longer adjust incorrect number of raid stripes supplied to lvcreate.
Move lcm and gcd to lib/misc.
+ Fix vgsplit of external origins. (2.02.162)
+ Prohibit creation of RAID LVs unless VG extent size is at least the page size.
Suppress some unnecessary --stripesize parameter warnings.
Fix 'pvmove -n name ...' to prohibit collocation of RAID SubLVs
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 7bbfd88..eaead89 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
-Version 1.02.134 -
-===================================
+Version 1.02.134 - 7th September 2016
+=====================================
+ Improve explanation of udev fallback in libdevmapper.h.
Version 1.02.133 - 10th August 2016
===================================
7 years, 7 months