1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Indicate whether or not VG is clustered in vgcreate log message.

Mention default --clustered setting in vgcreate man page.
This commit is contained in:
Alasdair Kergon 2008-04-08 14:22:13 +00:00
parent e8d3d71e23
commit 54396b890d
3 changed files with 18 additions and 9 deletions

View File

@ -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.

View File

@ -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

View File

@ -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;
}