Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9399b74356f9d0c2…
Commit: 9399b74356f9d0c2fbbac824908b15d63c3935cd
Parent: de12310c457964e76e6558cbe079901a34ce4ef4
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jun 5 22:27:40 2014 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jun 5 22:27:40 2014 -0500
vgchange: Prompt when setting VG cluster attr if cluster is not setup
If clvmd is not running or the locking type is not clustered and someone
attempts to set the cluster attribute on a volume group, prompt them to
see if they are sure. (Only prompt for one though. If neither are true,
simply ask them once.)
---
tools/vgchange.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 05e7aea..478a8ca 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -317,6 +317,21 @@ static int _vgchange_clustered(struct cmd_context *cmd,
return 0;
}
+ if (clustered) {
+ if (!dm_daemon_is_running(CLVMD_PIDFILE)) {
+ if (yes_no_prompt("LVM cluster daemon (clvmd) is not"
+ " running.\n"
+ "Make volume group \"%s\" clustered"
+ " anyway? [y/n]: ", vg->name) == 'n')
+ return 0;
+
+ } else if (!locking_is_clustered() &&
+ (yes_no_prompt("LVM locking type is not clustered.\n"
+ "Make volume group \"%s\" clustered"
+ " anyway? [y/n]: ", vg->name) == 'n'))
+ return 0;
+ }
+
if (!vg_set_clustered(vg, clustered))
return_0;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=46b0cd10fe2405f2…
Commit: 46b0cd10fe2405f281651fcfea5f536573fa7cbc
Parent: c4e0c6127247c421e40d9d387ba89d8cd9899f5f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jun 5 18:02:40 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 5 18:02:40 2014 +0200
configure: do not exit with error code
Since the test is the last command make a test in a form it will be
after its finished 0.
(regression from last configure cleanup)
---
configure | 2 +-
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index bedccca..034ee12 100755
--- a/configure
+++ b/configure
@@ -13453,5 +13453,5 @@ $as_echo "$as_me: WARNING: Support for thin provisioning is limited since some t
test -n "$THIN_CHECK_VERSION_WARN" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You should also install thin_check vsn 0.3.2 (or later) to use lvm2 thin provisioning" >&5
$as_echo "$as_me: WARNING: You should also install thin_check vsn 0.3.2 (or later) to use lvm2 thin provisioning" >&2;}
-test "$ODIRECT" != yes && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5
+test "$ODIRECT" = yes || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5
$as_echo "$as_me: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&2;}
diff --git a/configure.in b/configure.in
index a1dfee5..12404ba 100644
--- a/configure.in
+++ b/configure.in
@@ -1762,4 +1762,4 @@ test -n "$THIN_CONFIGURE_WARN" && AC_MSG_WARN([Support for thin provisioning is
test -n "$THIN_CHECK_VERSION_WARN" && AC_MSG_WARN([You should also install thin_check vsn 0.3.2 (or later) to use lvm2 thin provisioning])
-test "$ODIRECT" != yes && AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])
+test "$ODIRECT" = yes || AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])