master - cache: Properly rename origin LV tree when adding "_corig"
by Jonathan Brassow
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=962a40b9813441...
Commit: 962a40b98134417f27e89709625ba2ec662204c2
Parent: fea8abe56ae506e8c924a317cd701e159aab824c
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Mon Jun 16 18:15:39 2014 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Mon Jun 16 18:15:39 2014 -0500
cache: Properly rename origin LV tree when adding "_corig"
When creating a cache LV with a RAID origin, we need to ensure that
the sub-LVs of that origin properly change their names to include
the "_corig" extention of the top-level LV. We do this by first
performing a 'lv_rename_update' before making the call to
'insert_layer_for_lv'.
---
WHATS_NEW | 1 +
lib/metadata/cache_manip.c | 19 ++++++++++++++++-
test/shell/lvconvert-cache.sh | 44 +++++++++++++++++++++++++++++++++++++++++
test/shell/lvcreate-cache.sh | 16 ++++++++++----
4 files changed, 74 insertions(+), 6 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index dcde550..5d83a66 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ When converting RAID origin to cache LV, properly rename sub-LVs.
Use RemoveOnStop for lvm2-lvmetad.socket systemd unit.
Add thin-generic configuration profile for generic thin settings.
Fix crash when reporting of empty labels on pvs.
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c
index 0e2569c..456bc86 100644
--- a/lib/metadata/cache_manip.c
+++ b/lib/metadata/cache_manip.c
@@ -91,6 +91,8 @@ struct logical_volume *lv_cache_create(struct logical_volume *pool,
struct cmd_context *cmd = pool->vg->cmd;
struct logical_volume *cache_lv;
struct lv_segment *seg;
+ int origin_name_len = strlen(origin->name);
+ char origin_name[origin_name_len + 7]; /* + "_corig" and NULL */
if (!lv_is_cache_pool(pool)) {
log_error(INTERNAL_ERROR
@@ -122,8 +124,23 @@ struct logical_volume *lv_cache_create(struct logical_volume *pool,
if (!(segtype = get_segtype_from_string(cmd, "cache")))
return_NULL;
+ /*
+ * insert_layer_for_lv does not rename the sub-LVs when adding
+ * the suffix. So, we rename everything here and then change
+ * only the top-level LV back before adding the layer.
+ */
+ sprintf(origin_name, "%s_corig", origin->name);
+ if (!lv_rename_update(cmd, origin, origin_name, 0)) {
+ log_error("Failed to rename origin LV, %s", origin->name);
+ return NULL;
+ }
+
+ origin_name[origin_name_len] = '\0';
+ if (!(origin->name = dm_pool_strdup(origin->vg->vgmem, origin_name)))
+ return_0;
+
cache_lv = origin;
- if (!insert_layer_for_lv(cmd, cache_lv, CACHE, "_corig"))
+ if (!(origin = insert_layer_for_lv(cmd, cache_lv, CACHE, "_corig")))
return_NULL;
seg = first_seg(cache_lv);
diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh
new file mode 100644
index 0000000..79d5fd1
--- /dev/null
+++ b/test/shell/lvconvert-cache.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+. lib/inittest
+
+aux have_cache 1 3 0 || skip
+
+aux prepare_vg 5 80
+
+# lvcreate origin, lvcreate cache-pool, and lvconvert to cache
+lvcreate -l 2 -n $lv1 $vg
+lvcreate --type cache-pool -l 1 -n ${lv1}_cachepool $vg
+lvconvert --type cache --cachepool $vg/${lv1}_cachepool $vg/$lv1
+dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
+lvremove -ff $vg
+
+# Bug 1095843
+# lvcreate RAID1 origin, lvcreate cache-pool, and lvconvert to cache
+lvcreate --type raid1 -m 1 -l 2 -n $lv1 $vg
+lvcreate --type cache-pool -l 1 -n ${lv1}_cachepool $vg
+lvconvert --type cache --cachepool $vg/${lv1}_cachepool $vg/$lv1
+lvs -a $vg/${lv1}_corig_rimage_0 # ensure images are properly renamed
+dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
+lvremove -ff $vg
+
+# lvcreate RAID1 origin, lvcreate RAID1 cache-pool, and lvconvert to cache
+lvcreate --type raid1 -m 1 -l 2 -n $lv1 $vg
+lvcreate --type raid1 -m 1 -l 2 -n ${lv1}_cachepool $vg
+lvconvert --type cache-pool --yes $vg/${lv1}_cachepool
+#should lvs -a $vg/${lv1}_cdata_rimage_0 # ensure images are properly renamed
+lvconvert --type cache --cachepool $vg/${lv1}_cachepool $vg/$lv1
+lvs -a $vg/${lv1}_corig_rimage_0 # ensure images are properly renamed
+dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
+lvremove -ff $vg
+
+vgremove -f $vg
diff --git a/test/shell/lvcreate-cache.sh b/test/shell/lvcreate-cache.sh
index c4b4a75..4274897 100644
--- a/test/shell/lvcreate-cache.sh
+++ b/test/shell/lvcreate-cache.sh
@@ -69,14 +69,20 @@ lvremove -f $vg/cache_pool
#lvcreate -H -l 2 $vg/cache_pool -n $lv1
#lvremove -f $vg
-if [ 1 -eq 0 ]; then
+# Bug 1110026
# Create origin, then cache_pool and cache
-# FIXME: This case needs to use lvconvert
lvcreate -l 2 -n $lv1 $vg
-lvconvert --type cache -l 1 $vg/$lv1 $mode
-dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
+lvcreate --type cache -l 1 $vg/$lv1
+#should dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
+lvremove -ff $vg
+
+# Bug 1110026 & Bug 1095843
+# Create RAID1 origin, then cache_pool and cache
+lvcreate -l 2 -n $lv1 $vg
+lvcreate --type cache -l 1 $vg/$lv1
+#should lvs -a $vg/${lv1}_corig_rimage_0 # ensure images are properly renamed
+#should dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
lvremove -ff $vg
-fi
# Shorthand CLI (origin exists, create cache_pool and cache)
#lvcreate -l 1 -n $lv1 $vg
8 years, 11 months
master - systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fea8abe56ae506...
Commit: fea8abe56ae506e8c924a317cd701e159aab824c
Parent: 4c9fbe048fa9a7b9c21ef96aa431a28151acdb1d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jun 13 15:45:25 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jun 13 15:45:25 2014 +0200
systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket
Systemd version 214 introduced new "RemoveOnStop" option for socket
units to remove the socket/FIFO when the particular unit is stopped.
Also https://bugzilla.redhat.com/show_bug.cgi?id=802748.
---
WHATS_NEW | 1 +
WHATS_NEW_DM | 1 +
scripts/dm_event_systemd_red_hat.socket.in | 1 +
scripts/lvm2_lvmetad_systemd_red_hat.socket.in | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6791f34..dcde550 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ Use RemoveOnStop for lvm2-lvmetad.socket systemd unit.
Add thin-generic configuration profile for generic thin settings.
Fix crash when reporting of empty labels on pvs.
Use retry_deactivation also when cleaning orphan devices.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 976f927..90dd5f5 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.88 -
=================================
+ Use RemoveOnStop for dm-event.socket systemd unit.
Document env var 'DM_DEFAULT_NAME_MANGLING_MODE' in dmsetup man page.
Warn user about incorrect use of cookie with 'dmsetup remove --force'.
Also recognize 'help'/'?' as reserved sort key name to show help.
diff --git a/scripts/dm_event_systemd_red_hat.socket.in b/scripts/dm_event_systemd_red_hat.socket.in
index b27c68d..80bcbb9 100644
--- a/scripts/dm_event_systemd_red_hat.socket.in
+++ b/scripts/dm_event_systemd_red_hat.socket.in
@@ -7,6 +7,7 @@ DefaultDependencies=no
ListenFIFO=@DEFAULT_DM_RUN_DIR@/dmeventd-server
ListenFIFO=@DEFAULT_DM_RUN_DIR@/dmeventd-client
SocketMode=0600
+RemoveOnStop=true
[Install]
WantedBy=sockets.target
diff --git a/scripts/lvm2_lvmetad_systemd_red_hat.socket.in b/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
index 071fd64..9575f98 100644
--- a/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
+++ b/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
@@ -6,6 +6,7 @@ DefaultDependencies=no
[Socket]
ListenStream=@DEFAULT_RUN_DIR(a)/lvmetad.socket
SocketMode=0600
+RemoveOnStop=true
[Install]
WantedBy=sysinit.target
8 years, 12 months
master - spec: new thin-generic.profile
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4c9fbe048fa9a7...
Commit: 4c9fbe048fa9a7b9c21ef96aa431a28151acdb1d
Parent: 8e0687ca690f9c5aa009e4b1963d46a03f8ba54c
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jun 13 10:01:34 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jun 13 10:01:34 2014 +0200
spec: new thin-generic.profile
---
spec/packages.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index 4862430..f0b7cfd 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -150,6 +150,7 @@ fi
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
8 years, 12 months
master - profile: add thin-generic.profile
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8e0687ca690f9c...
Commit: 8e0687ca690f9c5aa009e4b1963d46a03f8ba54c
Parent: cf4d5ead0210aa12dfd73fed2061d4d9febce827
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jun 13 09:45:26 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jun 13 09:56:29 2014 +0200
profile: add thin-generic.profile
The thin-generic.profile contains settings for thin/thin pool volumes
suitable for generic environment/use containing default settings.
This allows users to change the global lvm.conf settings at will
and still keep the original settings for volumes that have this
thin profile assigned already.
---
WHATS_NEW | 1 +
conf/Makefile.in | 2 +-
conf/thin-generic.profile | 4 ++++
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b77d404..6791f34 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ Add thin-generic configuration profile for generic thin settings.
Fix crash when reporting of empty labels on pvs.
Use retry_deactivation also when cleaning orphan devices.
Prompt when setting the VG cluster attr if the cluster is not setup.
diff --git a/conf/Makefile.in b/conf/Makefile.in
index 54852e2..e56b25e 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -19,7 +19,7 @@ CONFSRC=example.conf
CONFDEST=lvm.conf
PROFILE_TEMPLATES=command_profile_template.profile metadata_profile_template.profile
-PROFILES=$(PROFILE_TEMPLATES) $(srcdir)/thin-performance.profile
+PROFILES=$(PROFILE_TEMPLATES) $(srcdir)/thin-generic.profile $(srcdir)/thin-performance.profile
include $(top_builddir)/make.tmpl
diff --git a/conf/thin-generic.profile b/conf/thin-generic.profile
new file mode 100644
index 0000000..229a7fc
--- /dev/null
+++ b/conf/thin-generic.profile
@@ -0,0 +1,4 @@
+allocation {
+ thin_pool_chunk_size_policy = "generic"
+ thin_pool_zero = 1
+}
8 years, 12 months
master - test: pvs bz1108394
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cf4d5ead0210aa...
Commit: cf4d5ead0210aa12dfd73fed2061d4d9febce827
Parent: eb316fec33e3866b92357a8aab1dd7a3c4b86075
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 12 11:31:21 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 12 11:56:06 2014 +0200
test: pvs bz1108394
---
test/shell/pvremove-usage.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/test/shell/pvremove-usage.sh b/test/shell/pvremove-usage.sh
index 3ebfd15..52d26a6 100644
--- a/test/shell/pvremove-usage.sh
+++ b/test/shell/pvremove-usage.sh
@@ -23,6 +23,10 @@ pvremove "$dev2"
# failing, but still removing everything what can be removed
# is somewhat odd as default, what do we have -f for?
pvs | not grep "$dev2"
+pvs -a | grep "$dev2"
+# bz1108394 no crash on nonPV label listing
+pvs -a -o+devices
+
pvcreate --metadatacopies 0 "$dev2"
# check pvremove refuses to remove pv in a vg
8 years, 12 months
master - libdm: dm_report_object report error for no data
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=eb316fec33e386...
Commit: eb316fec33e3866b92357a8aab1dd7a3c4b86075
Parent: 3d9737442b97665aea1d03483f218806727a254d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 12 11:38:04 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 12 11:56:06 2014 +0200
libdm: dm_report_object report error for no data
NULL data would cause problems....
---
libdm/libdm-report.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 820fa2a..bdc293b 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -738,9 +738,11 @@ int dm_report_object(struct dm_report *rh, void *object)
}
field->props = fp;
- data = _report_get_field_data(rh, fp, object);
- if (!data)
+ if (!(data = _report_get_field_data(rh, fp, object))) {
+ log_error("dm_report_object: no data for field %s",
+ rh->fields[fp->field_num].id);
return 0;
+ }
if (!rh->fields[fp->field_num].report_fn(rh, rh->mem,
field, data,
8 years, 12 months
master - libdm: dm_report_object avoid duplicat strlen call
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3d9737442b9766...
Commit: 3d9737442b97665aea1d03483f218806727a254d
Parent: 922f884abeae010589fa775b022d284dfec9e075
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 12 11:36:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 12 11:56:06 2014 +0200
libdm: dm_report_object avoid duplicat strlen call
Remember strlen result.
---
libdm/libdm-report.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index f3395a7..820fa2a 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -703,6 +703,7 @@ int dm_report_object(struct dm_report *rh, void *object)
struct row *row;
struct dm_report_field *field;
void *data = NULL;
+ int len;
if (!rh) {
log_error(INTERNAL_ERROR "dm_report handler is NULL.");
@@ -750,8 +751,9 @@ int dm_report_object(struct dm_report *rh, void *object)
return 0;
}
- if (((int) strlen(field->report_string) > field->props->width))
- field->props->width = (int) strlen(field->report_string);
+ len = (int) strlen(field->report_string);
+ if (len > field->props->width)
+ field->props->width = len;
if ((rh->flags & RH_SORT_REQUIRED) &&
(field->props->flags & FLD_SORT_KEY)) {
8 years, 12 months
master - report: avoid passing NULL label
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=922f884abeae01...
Commit: 922f884abeae010589fa775b022d284dfec9e075
Parent: c230ae95abf4e0dd08183c37d204b0145ce0a5e8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 12 11:33:16 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 12 11:55:58 2014 +0200
report: avoid passing NULL label
Internal reporting function cannot handle NULL reporting value,
so ensure there is at least dummy label.
So move dummy_lable from tools/reporter.c and use it for all
report_object() calls in lib/report/report.c.
(Fixes RHBZ 1108394)
Simlify lvm_report_object initialization.
---
WHATS_NEW | 1 +
lib/report/report.c | 32 ++++++++++++++++++++++++--------
tools/reporter.c | 20 +-------------------
3 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 4310dd1..b77d404 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.107 -
==================================
+ Fix crash when reporting of empty labels on pvs.
Use retry_deactivation also when cleaning orphan devices.
Prompt when setting the VG cluster attr if the cluster is not setup.
Allow --yes to skip prompt in vgextend (worked only with -f).
diff --git a/lib/report/report.c b/lib/report/report.c
index 681e80c..6b32bee 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -1274,19 +1274,35 @@ int report_object(void *handle, struct volume_group *vg,
struct lv_segment *seg, struct pv_segment *pvseg,
struct label *label)
{
- struct lvm_report_object obj;
+ struct device dummy_device = { .dev = 0 };
+ struct label dummy_label = { .dev = &dummy_device };
+ struct lvm_report_object obj = {
+ .vg = vg,
+ .lv = lv,
+ .pv = pv,
+ .seg = seg,
+ .pvseg = pvseg,
+ .label = label ? : (pv ? pv_label(pv) : NULL)
+ };
+
+ /* FIXME workaround for pv_label going through cache; remove once struct
+ * physical_volume gains a proper "label" pointer */
+ if (!obj.label) {
+ if (pv) {
+ if (pv->fmt)
+ dummy_label.labeller = pv->fmt->labeller;
+ if (pv->dev)
+ dummy_label.dev = pv->dev;
+ else
+ memcpy(dummy_device.pvid, &pv->id, ID_LEN);
+ }
+ obj.label = &dummy_label;
+ }
/* The two format fields might as well match. */
if (!vg && pv)
_dummy_fid.fmt = pv->fmt;
- obj.vg = vg;
- obj.lv = lv;
- obj.pv = pv;
- obj.seg = seg;
- obj.pvseg = pvseg;
- obj.label = label ? label : (pv ? pv_label(pv) : NULL);
-
return dm_report_object(handle, &obj);
}
diff --git a/tools/reporter.c b/tools/reporter.c
index b4a0c0b..b20b8ed 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -140,9 +140,6 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
const char *vg_name = NULL;
struct volume_group *old_vg = vg;
char uuid[64] __attribute__((aligned(8)));
- struct label *label;
- struct label dummy_label = { .dev = 0 };
- struct device dummy_device = { .dev = 0 };
if (is_pv(pv) && !is_orphan(pv) && !vg) {
vg_name = pv_vg_name(pv);
@@ -180,22 +177,7 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg,
pv = pvl->pv;
}
- /* FIXME workaround for pv_label going through cache; remove once struct
- * physical_volume gains a proper "label" pointer */
- if (!(label = pv_label(pv))) {
- if (pv->fmt)
- dummy_label.labeller = pv->fmt->labeller;
-
- if (pv->dev)
- dummy_label.dev = pv->dev;
- else {
- dummy_label.dev = &dummy_device;
- memcpy(dummy_device.pvid, &pv->id, ID_LEN);
- }
- label = &dummy_label;
- }
-
- if (!report_object(handle, vg, NULL, pv, NULL, NULL, label)) {
+ if (!report_object(handle, vg, NULL, pv, NULL, NULL, NULL)) {
stack;
ret = ECMD_FAILED;
}
8 years, 12 months
master - tests: change to inittest
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c230ae95abf4e0...
Commit: c230ae95abf4e0dd08183c37d204b0145ce0a5e8
Parent: 3f81b7c55c612ab24ade8d637517a33298b2cc94
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jun 11 17:46:55 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jun 11 17:46:55 2014 +0200
tests: change to inittest
---
test/shell/pvremove-warnings.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/pvremove-warnings.sh b/test/shell/pvremove-warnings.sh
index c9b7c6a..f9d2737 100644
--- a/test/shell/pvremove-warnings.sh
+++ b/test/shell/pvremove-warnings.sh
@@ -8,7 +8,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-. lib/test
+. lib/inittest
aux prepare_devs 2
pvcreate "$dev1" "$dev2"
8 years, 12 months
master - tests: update vgchange -c
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f81b7c55c612a...
Commit: 3f81b7c55c612ab24ade8d637517a33298b2cc94
Parent: f845afe7cfc98ac1cde86e25d60c6eeeb530eebe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Jun 10 13:13:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jun 11 11:11:10 2014 +0200
tests: update vgchange -c
Vgchange now detects runnig clvmd - so update test to reflect this.
---
test/shell/vgchange-usage.sh | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/shell/vgchange-usage.sh b/test/shell/vgchange-usage.sh
index 54734c1..6ba3f69 100644
--- a/test/shell/vgchange-usage.sh
+++ b/test/shell/vgchange-usage.sh
@@ -88,15 +88,19 @@ vgcreate -cn $vg "$dev1" "$dev2" "$dev3"
fail vgchange -cy |& tee out
grep "y/n" out
check vg_attr_bit cluster $vg "-"
-vgchange -cy $vg
-fail vgchange -cy $vg
# check on cluster
# either skipped as clustered (non-cluster), or already clustered (on cluster)
if test -e LOCAL_CLVMD ; then
+ vgchange -cy $vg
+ fail vgchange -cy $vg
check vg_attr_bit cluster $vg "c"
vgchange -cn $vg
else
+ # no clvmd is running
+ fail vgchange -cy $vg
+ vgchange --yes -cy $vg
+ fail vgchange --yes -cy $vg
fail vgs $vg |& tee out
grep "Skipping clustered volume group" out
vgs --ignoreskippedcluster $vg |& tee out
8 years, 12 months