diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-04-08 14:22:13 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-04-08 14:22:13 +0000 |
commit | 54396b890d18d31a71e6f1a0d4a54a854c336e0d (patch) | |
tree | c0f1227195236f657a650ce02c6e4d1051cd3faf | |
parent | e8d3d71e23e34c01467947ca57a5da5573f10e8b (diff) | |
download | lvm2-54396b890d18d31a71e6f1a0d4a54a854c336e0d.tar.gz lvm2-54396b890d18d31a71e6f1a0d4a54a854c336e0d.tar.xz lvm2-54396b890d18d31a71e6f1a0d4a54a854c336e0d.zip |
Indicate whether or not VG is clustered in vgcreate log message.
Mention default --clustered setting in vgcreate man page.
-rw-r--r-- | WHATS_NEW | 4 | ||||
-rw-r--r-- | man/vgcreate.8 | 11 | ||||
-rw-r--r-- | tools/vgcreate.c | 12 |
3 files changed, 18 insertions, 9 deletions
@@ -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; } |