summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WHATS_NEW4
-rw-r--r--man/vgcreate.811
-rw-r--r--tools/vgcreate.c12
3 files changed, 18 insertions, 9 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 92d51b44..3b60a8fd 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,8 @@
Version 2.02.34 -
===================================
- Addd config file overrides to clvmd when it reads the active LVs list
+ Indicate whether or not VG is clustered in vgcreate log message.
+ Mention default --clustered setting in vgcreate man page.
+ Add config file overrides to clvmd when it reads the active LVs list.
Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.
Add (empty) orphan VGs to lvmcache during initialisation.
Fix orphan VG name used for format_pool.
diff --git a/man/vgcreate.8 b/man/vgcreate.8
index 33f939f7..811049e1 100644
--- a/man/vgcreate.8
+++ b/man/vgcreate.8
@@ -35,12 +35,13 @@ previously configured for LVM with
See \fBlvm\fP for common options.
.TP
.BR \-c ", " \-\-clustered " " { y | n }
-If clustered locking is enabled, this indicates whether this
-Volume Group is shared with other nodes in the cluster or whether
-it contains only local disks that are not visible on the other nodes.
+If clustered locking is enabled, this defaults to \fBy\fP indicating that
+this Volume Group is shared with other nodes in the cluster.
+
+If the new Volume Group contains only local disks that are not visible
+on the other nodes, you must specify \fB\-\-clustered\ n\fP.
If the cluster infrastructure is unavailable on a particular node at a
-particular time, you may still be able to use Volume Groups that
-are not marked as clustered.
+particular time, you may still be able to use such Volume Groups.
.TP
.BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes\fR
Sets the maximum number of logical volumes allowed in this
diff --git a/tools/vgcreate.c b/tools/vgcreate.c
index 188b8f9e..62c957ad 100644
--- a/tools/vgcreate.c
+++ b/tools/vgcreate.c
@@ -21,6 +21,7 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
struct vgcreate_params vp_def;
struct volume_group *vg;
const char *tag;
+ const char *clustered_message = "";
if (!argc) {
log_error("Please provide volume group name and "
@@ -78,10 +79,14 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
}
/* FIXME: move this inside vg_create? */
- if (vp_new.clustered)
+ if (vp_new.clustered) {
vg->status |= CLUSTERED;
- else
+ clustered_message = "Clustered ";
+ } else {
vg->status &= ~CLUSTERED;
+ if (locking_is_clustered())
+ clustered_message = "Non-clustered ";
+ }
if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
log_error("Can't get lock for orphan PVs");
@@ -112,7 +117,8 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
backup(vg);
- log_print("Volume group \"%s\" successfully created", vg->name);
+ log_print("%s%colume group \"%s\" successfully created",
+ clustered_message, *clustered_message ? 'v' : 'V', vg->name);
return ECMD_PROCESSED;
}