master - format_text: Fix creation_host_system_id.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a5df78e0f045e3...
Commit: a5df78e0f045e374f44be2fad3c09d44d39314f7
Parent: cc5e3dbf24f69df8f7410919df3a9f11988cee54
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 19:19:48 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 19:19:48 2015 +0000
format_text: Fix creation_host_system_id.
Don't escape quotes - forbidden characters.
---
lib/format_text/export.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/format_text/export.c b/lib/format_text/export.c
index d853bb5..d6a92c4 100644
--- a/lib/format_text/export.c
+++ b/lib/format_text/export.c
@@ -352,7 +352,7 @@ static int _print_header(struct cmd_context *cmd, struct formatter *f,
_utsname.sysname, _utsname.nodename, _utsname.release,
_utsname.version, _utsname.machine);
if (cmd->system_id && *cmd->system_id)
- outf(f, "creation_host_system_id = \"%s\"", dm_escape_double_quotes(buf, cmd->system_id));
+ outf(f, "creation_host_system_id = \"%s\"", cmd->system_id);
outf(f, "creation_time = %lu\t# %s", t, ctime(&t));
return 1;
9 years, 1 month
master - format_text: Store creation_host_system_id.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cc5e3dbf24f69d...
Commit: cc5e3dbf24f69df8f7410919df3a9f11988cee54
Parent: 2a1189ebc34d640396b87be410642cc394d01f27
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 17:54:47 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 17:54:47 2015 +0000
format_text: Store creation_host_system_id.
Record the current system ID at the time of writing out VG metadata
in the outer section of it alongside the hostname and time.
---
WHATS_NEW | 1 +
lib/format_text/export.c | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 92bb1aa..0ae007d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.117 -
====================================
+ Record creation_host_system_id in lvm2 metadata.
Reinstate recursive config file tag section processing. (2.02.99)
Add 'lvm systemid' to display the current system ID.
Fix configure to properly recognize --with-default-raid10-segtype option.
diff --git a/lib/format_text/export.c b/lib/format_text/export.c
index c2453f2..d853bb5 100644
--- a/lib/format_text/export.c
+++ b/lib/format_text/export.c
@@ -21,6 +21,7 @@
#include "segtype.h"
#include "text_export.h"
#include "lvm-version.h"
+#include "toolcontext.h"
#include <stdarg.h>
#include <time.h>
@@ -327,7 +328,7 @@ int out_config_node(struct formatter *f, const struct dm_config_node *cn)
return dm_config_write_node(cn, _out_line, f);
}
-static int _print_header(struct formatter *f,
+static int _print_header(struct cmd_context *cmd, struct formatter *f,
const char *desc)
{
char *buf;
@@ -350,6 +351,8 @@ static int _print_header(struct formatter *f,
outf(f, "creation_host = \"%s\"\t# %s %s %s %s %s", _utsname.nodename,
_utsname.sysname, _utsname.nodename, _utsname.release,
_utsname.version, _utsname.machine);
+ if (cmd->system_id && *cmd->system_id)
+ outf(f, "creation_host_system_id = \"%s\"", dm_escape_double_quotes(buf, cmd->system_id));
outf(f, "creation_time = %lu\t# %s", t, ctime(&t));
return 1;
@@ -744,7 +747,7 @@ static int _text_vg_export(struct formatter *f,
if (!_build_pv_names(f, vg))
goto_out;
- if (f->header && !_print_header(f, desc))
+ if (f->header && !_print_header(vg->cmd, f, desc))
goto_out;
if (!out_text(f, "%s {", vg->name))
@@ -767,7 +770,7 @@ static int _text_vg_export(struct formatter *f,
if (!out_text(f, "}"))
goto_out;
- if (!f->header && !_print_header(f, desc))
+ if (!f->header && !_print_header(vg->cmd, f, desc))
goto_out;
r = 1;
9 years, 1 month
master - config: Reinstate recursive tags setting.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a1189ebc34d64...
Commit: 2a1189ebc34d640396b87be410642cc394d01f27
Parent: 36a6c0df46a09657cb92908d41d272bc6b8a722d
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 17:40:58 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 17:40:58 2015 +0000
config: Reinstate recursive tags setting.
In 2.02.99, _init_tags() inadvertently began to ignore the
dm_config_tree struct passed to it. "tags" sections are not
merged together, so the "tags" section in the main config file was
being processed repeatedly and other "tags" sections were ignored.
---
WHATS_NEW | 1 +
lib/commands/toolcontext.c | 5 +++--
lib/config/config.c | 33 +++++++++++++++++++++++++++++++--
lib/config/config.h | 6 ++++++
4 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fa4e2b0..92bb1aa 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.117 -
====================================
+ Reinstate recursive config file tag section processing. (2.02.99)
Add 'lvm systemid' to display the current system ID.
Fix configure to properly recognize --with-default-raid10-segtype option.
Do not refresh filters/rescan if no signature is wiped during pvcreate.
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index f984f70..2e15086 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -623,11 +623,12 @@ static int _init_tags(struct cmd_context *cmd, struct dm_config_tree *cft)
const char *tag;
int passes;
- if (!(tn = find_config_tree_node(cmd, tags_CFG_SECTION, NULL)) || !tn->child)
+ /* Access tags section directly */
+ if (!(tn = find_config_node(cmd, cft, tags_CFG_SECTION)) || !tn->child)
return 1;
/* NB hosttags 0 when already 1 intentionally does not delete the tag */
- if (!cmd->hosttags && find_config_tree_bool(cmd, tags_hosttags_CFG, NULL)) {
+ if (!cmd->hosttags && find_config_bool(cmd, cft, tags_hosttags_CFG)) {
/* FIXME Strip out invalid chars: only A-Za-z0-9_+.- */
if (!_set_tag(cmd, cmd->hostname))
return_0;
diff --git a/lib/config/config.c b/lib/config/config.c
index b47984f..d7b11c3 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -649,8 +649,8 @@ static void _log_type_error(const char *path, cfg_def_type_t actual,
_get_type_name(actual_type_name, sizeof(actual_type_name), actual);
_get_type_name(expected_type_name, sizeof(expected_type_name), expected);
- log_warn_suppress(suppress_messages, "Configuration setting \"%s\" has invalid type. "
- "Found%s, expected%s.", path,
+ log_warn_suppress(suppress_messages, "WARNING: Configuration setting \"%s\" has invalid type. "
+ "Found%s but expected%s.", path,
actual_type_name, expected_type_name);
}
@@ -1145,6 +1145,19 @@ static int _apply_local_profile(struct cmd_context *cmd, struct profile *profile
return override_config_tree_from_profile(cmd, profile);
}
+const struct dm_config_node *find_config_node(struct cmd_context *cmd, struct dm_config_tree *cft, int id)
+{
+ cfg_def_item_t *item = cfg_def_get_item_p(id);
+ char path[CFG_PATH_MAX_LEN];
+ const struct dm_config_node *cn;
+
+ _cfg_def_make_path(path, sizeof(path), item->id, item, 0);
+
+ cn = dm_config_tree_find_node(cft, path);
+
+ return cn;
+}
+
const struct dm_config_node *find_config_tree_node(struct cmd_context *cmd, int id, struct profile *profile)
{
cfg_def_item_t *item = cfg_def_get_item_p(id);
@@ -1270,6 +1283,22 @@ float find_config_tree_float(struct cmd_context *cmd, int id, struct profile *pr
return f;
}
+int find_config_bool(struct cmd_context *cmd, struct dm_config_tree *cft, int id)
+{
+ cfg_def_item_t *item = cfg_def_get_item_p(id);
+ char path[CFG_PATH_MAX_LEN];
+ int b;
+
+ _cfg_def_make_path(path, sizeof(path), item->id, item, 0);
+
+ if (item->type != CFG_TYPE_BOOL)
+ log_error(INTERNAL_ERROR "%s cfg tree element not declared as boolean.", path);
+
+ b = dm_config_tree_find_bool(cft, path, cfg_def_get_default_value(cmd, item, CFG_TYPE_BOOL, NULL));
+
+ return b;
+}
+
int find_config_tree_bool(struct cmd_context *cmd, int id, struct profile *profile)
{
cfg_def_item_t *item = cfg_def_get_item_p(id);
diff --git a/lib/config/config.h b/lib/config/config.h
index d095519..965214e 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -231,6 +231,12 @@ int merge_config_tree(struct cmd_context *cmd, struct dm_config_tree *cft,
struct dm_config_tree *newdata, config_merge_t);
/*
+ * The next two do not check config overrides and must only be used for the tags section.
+ */
+const struct dm_config_node *find_config_node(struct cmd_context *cmd, struct dm_config_tree *cft, int id);
+int find_config_bool(struct cmd_context *cmd, struct dm_config_tree *cft, int id);
+
+/*
* These versions check an override tree, if present, first.
*/
const struct dm_config_node *find_config_tree_node(struct cmd_context *cmd, int id, struct profile *profile);
9 years, 1 month
master - systemid: Add built-in systemid command.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=36a6c0df46a096...
Commit: 36a6c0df46a09657cb92908d41d272bc6b8a722d
Parent: fcebf27a9ff52838e5730b82774effd1bf123b18
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 17:26:50 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 17:26:50 2015 +0000
systemid: Add built-in systemid command.
Make it easy to find the system ID when testing.
Also show in general debug output.
---
WHATS_NEW | 1 +
man/lvm.8.in | 2 ++
tools/Makefile.in | 2 +-
tools/commands.h | 5 +++++
tools/lvmcmdline.c | 10 ++++++++++
5 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7bf4dfb..fa4e2b0 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.117 -
====================================
+ Add 'lvm systemid' to display the current system ID.
Fix configure to properly recognize --with-default-raid10-segtype option.
Do not refresh filters/rescan if no signature is wiped during pvcreate.
Enforce none external dev info for wiping during pvcreate to avoid races.
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 766b8aa..2faaba4 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -56,6 +56,8 @@ loading \fBlvm.conf\fP(5) and any other configuration files.
.TP
\fBsegtypes\fP \(em Display recognised Logical Volume segment types.
.TP
+\fBsystemid\fP \(em Display the system ID, if any, currently set on this host.
+.TP
\fBtags\fP \(em Display any tags defined on this host.
.TP
\fBversion\fP \(em Display version information.
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 6171322..5c1583f 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -166,7 +166,7 @@ liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
.commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile
$(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \
- egrep -v '^ *(|#.*|devtypes|dumpconfig|formats|help|pvdata|segtypes|tags|version) *$$' > .commands
+ egrep -v '^ *(|#.*|devtypes|dumpconfig|formats|help|pvdata|segtypes|systemid|tags|version) *$$' > .commands
ifneq ("$(CFLOW_CMD)", "")
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
diff --git a/tools/commands.h b/tools/commands.h
index 15a1bb1..05ee186 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -890,6 +890,11 @@ xx(segtypes,
PERMITTED_READ_ONLY,
"segtypes\n")
+xx(systemid,
+ "Display the system ID, if any, currently set on this host",
+ PERMITTED_READ_ONLY,
+ "systemid\n")
+
xx(tags,
"List tags defined on this host",
PERMITTED_READ_ONLY,
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index e586777..6bdb00b 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -977,6 +977,15 @@ static int _merge_synonym(struct cmd_context *cmd, int oldarg, int newarg)
return 1;
}
+int systemid(struct cmd_context *cmd __attribute__((unused)),
+ int argc __attribute__((unused)),
+ char **argv __attribute__((unused)))
+{
+ log_print("System ID: %s", cmd->system_id ? : "");
+
+ return ECMD_PROCESSED;
+}
+
int version(struct cmd_context *cmd __attribute__((unused)),
int argc __attribute__((unused)),
char **argv __attribute__((unused)))
@@ -1456,6 +1465,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
init_dmeventd_monitor(monitoring);
log_debug("Processing: %s", cmd->cmd_line);
+ log_debug("System ID: %s", cmd->system_id ? : "");
#ifdef O_DIRECT_SUPPORT
log_debug("O_DIRECT will be used");
9 years, 1 month
master - lvm-string: Fix HYPEN typo.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fcebf27a9ff528...
Commit: fcebf27a9ff52838e5730b82774effd1bf123b18
Parent: 48478363109b1ea23a9f0acae8dbfd838cf925c6
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 17:09:35 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 17:09:35 2015 +0000
lvm-string: Fix HYPEN typo.
---
lib/display/display.c | 2 +-
lib/misc/lvm-string.c | 2 +-
lib/misc/lvm-string.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/display/display.c b/lib/display/display.c
index f86b67f..b511b8e 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -855,7 +855,7 @@ void display_name_error(name_error_t name_error)
case NAME_INVALID_EMPTY:
log_error("Name is zero length.");
break;
- case NAME_INVALID_HYPEN:
+ case NAME_INVALID_HYPHEN:
log_error("Name cannot start with hyphen.");
break;
case NAME_INVALID_DOTS:
diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c
index f9cba31..61941b3 100644
--- a/lib/misc/lvm-string.c
+++ b/lib/misc/lvm-string.c
@@ -75,7 +75,7 @@ static name_error_t _validate_name(const char *n)
/* Hyphen used as VG-LV separator - ambiguity if LV starts with it */
if (*n == '-')
- return NAME_INVALID_HYPEN;
+ return NAME_INVALID_HYPHEN;
if ((*n == '.') && (!n[1] || (n[1] == '.' && !n[2]))) /* ".", ".." */
return NAME_INVALID_DOTS;
diff --git a/lib/misc/lvm-string.h b/lib/misc/lvm-string.h
index 0615f41..065c19f 100644
--- a/lib/misc/lvm-string.h
+++ b/lib/misc/lvm-string.h
@@ -28,7 +28,7 @@ struct logical_volume;
typedef enum name_error {
NAME_VALID = 0,
NAME_INVALID_EMPTY = -1,
- NAME_INVALID_HYPEN = -2,
+ NAME_INVALID_HYPHEN = -2,
NAME_INVALID_DOTS = -3,
NAME_INVALID_CHARSET = -4,
NAME_INVALID_LENGTH = -5
9 years, 1 month
master - lvmetad: Add fn to scan only foreign VGs.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=48478363109b1e...
Commit: 48478363109b1ea23a9f0acae8dbfd838cf925c6
Parent: 42ba7974c5e85f3b86807dacaf5f70a722475b52
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Feb 23 17:03:03 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Feb 23 17:03:03 2015 +0000
lvmetad: Add fn to scan only foreign VGs.
Not implemented yet - just a wrapper.
---
lib/cache/lvmetad.c | 8 ++++++++
lib/cache/lvmetad.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 20302c1..aad4423 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -1031,3 +1031,11 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler)
return r;
}
+/*
+ * FIXME Implement this function, skipping PVs known to belong to local or clustered,
+ * non-exported VGs.
+ */
+int lvmetad_pvscan_foreign_vgs(struct cmd_context *cmd, activation_handler handler)
+{
+ return lvmetad_pvscan_all_devs(cmd, handler);
+}
diff --git a/lib/cache/lvmetad.h b/lib/cache/lvmetad.h
index 2cd738e..4d6f107 100644
--- a/lib/cache/lvmetad.h
+++ b/lib/cache/lvmetad.h
@@ -156,6 +156,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
activation_handler handler);
int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler);
+int lvmetad_pvscan_foreign_vgs(struct cmd_context *cmd, activation_handler handler);
# else /* LVMETAD_SUPPORT */
@@ -181,6 +182,7 @@ int lvmetad_pvscan_all_devs(struct cmd_context *cmd, activation_handler handler)
# define lvmetad_vg_lookup(cmd, vgname, vgid) (NULL)
# define lvmetad_pvscan_single(cmd, dev, handler) (0)
# define lvmetad_pvscan_all_devs(cmd, handler) (0)
+# define lvmetad_pvscan_foreign_vgs(cmd, handler) (0)
# endif /* LVMETAD_SUPPORT */
9 years, 1 month
master - man lvmsystemid: update changing the system_id
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=42ba7974c5e85f...
Commit: 42ba7974c5e85f3b86807dacaf5f70a722475b52
Parent: cfd1b8eae2e2cf30768603d11756f6ec9316958a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 20 16:55:27 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 20 16:55:27 2015 -0600
man lvmsystemid: update changing the system_id
---
man/lvmsystemid.7.in | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/man/lvmsystemid.7.in b/man/lvmsystemid.7.in
index 9e3e6f8..c0dd78b 100644
--- a/man/lvmsystemid.7.in
+++ b/man/lvmsystemid.7.in
@@ -5,10 +5,10 @@ lvmsystemid \(em LVM system id
.SH DESCRIPTION
-Local VG's may exist on shared storage where they are visible to multiple
-hosts. These VG's are intended to be used by only a single machine, even
+Local VGs may exist on shared storage where they are visible to multiple
+hosts. These VGs are intended to be used by only a single machine, even
though they are visible to many. A system_id identifying a single host
-can be assigned to a VG to indicate the VG's owner. The VG owner can use
+can be assigned to a VG to indicate the VGs owner. The VG owner can use
the VG as usual, and all other hosts will ignore it. This protects the VG
from accidental use by other hosts.
@@ -29,7 +29,7 @@ A VG without a system_id can be used by any host, and a VG with a
system_id can only be used by a host with a matching system_id. A
.B foreign VG
is a VG with a system_id as viewed by a host with a system_id
-that does not match the VG's system_id. (Or from a host without a
+that does not match the VGs system_id. (Or from a host without a
system_id.)
Valid system_id characters are the same as valid VG name characters. If a
@@ -236,8 +236,9 @@ devices.
The system_id of a VG is displayed with the "systemid" reporting option.
Report/display commands ignore foreign VGs by default. To report foreign
-VGs, the --foreign option can be used. This causes all VGs to be read
-from disk.
+VGs, the --foreign option can be used. This causes the VGs to be read
+from disk. Because lvmetad caching is not used, this option can cause
+poor performance.
.B vgs --foreign -o+systemid
@@ -265,16 +266,22 @@ imported VG as foreign.
.SS vgchange
-If a VG has a system_id, changing it with vgchange requires --force.
-vgchange --systemid is accepted just as with vgcreate.
+A host can change the system_id of its own VGs, but the command requires
+confirmation because the host may lose access to the VG being changed:
-If a host's system_id is changed, the system_id of its own VG's can be
-changed to match. Using allow_system_id is a way to avoid using force
-with vgchange.
+.B vgchange --systemid
+.I SystemID VG
+
+A host cannot directly change the system_id of a foreign VG.
To move a VG from one host to another, vgexport and vgimport should be
used.
+To forcibly gain ownership of a foreign VG, a host can add the foreign
+system_id to its allow_system_id list, change the system_id of the foreign
+VG to its own, and remove the foreign system_id from its allow_system_id
+list.
+
.SS clustered VGs
A "clustered" VG should have no system_id set, allowing multiple hosts to
9 years, 2 months
master - man lvm: document --foreign option
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cfd1b8eae2e2cf...
Commit: cfd1b8eae2e2cf30768603d11756f6ec9316958a
Parent: 37a47c0eec68fe3b7abf760be87e619aa51bc544
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 20 16:26:04 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 20 16:26:04 2015 -0600
man lvm: document --foreign option
---
man/lvm.8.in | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 7bc4c6b..766b8aa 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -243,6 +243,12 @@ will be made to communicate with the device-mapper kernel driver, so
this option is unable to report whether or not Logical Volumes are
actually in use.
.TP
+.B \-\-foreign
+Cause the command to access foreign VGs, that would otherwise be skipped.
+It can be used to report or display a VG that is owned by another host.
+This option can cause a command to perform poorly because lvmetad caching
+is not used and metadata is read from disks.
+.TP
.B \-\-addtag \fITag
Add the tag \fITag\fP to a PV, VG or LV.
Supply this argument multiple times to add more than one tag at once.
9 years, 2 months
master - vgchange, vgcreate: add systemid option to command help
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=37a47c0eec68fe...
Commit: 37a47c0eec68fe3b7abf760be87e619aa51bc544
Parent: 3361e662f4b05096ca6cae9f4d96bbeec8ec4862
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 20 15:31:17 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 20 15:31:17 2015 -0600
vgchange, vgcreate: add systemid option to command help
---
tools/commands.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/commands.h b/tools/commands.h
index e82cfe4..15a1bb1 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -950,8 +950,10 @@ xx(vgchange,
"\t[--[vg]metadatacopies #copies]\n"
"\t[--poll {y|n}]\n"
"\t[--noudevsync]\n"
+ "\t[--systemid SystemID]\n"
"\t[--refresh]\n"
"\t[-S|--select Selection]\n"
+ "\t[--systemid SystemID]\n"
"\t[--sysinit]\n"
"\t[-t|--test]\n"
"\t[-u|--uuid]\n"
9 years, 2 months
master - man: systemid option for vgcreate and vgchange
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3361e662f4b050...
Commit: 3361e662f4b05096ca6cae9f4d96bbeec8ec4862
Parent: 55dd45239a52a7349f8a2380b3e29dc3beee39f5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 20 14:58:01 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 20 14:58:01 2015 -0600
man: systemid option for vgcreate and vgchange
---
man/vgchange.8.in | 8 ++++++++
man/vgcreate.8.in | 13 ++++++++++++-
2 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/man/vgchange.8.in b/man/vgchange.8.in
index 5014300..e6e850a 100644
--- a/man/vgchange.8.in
+++ b/man/vgchange.8.in
@@ -47,6 +47,8 @@ vgchange \(em change attributes of a volume group
.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
.RB [ \-S | \-\-select
.IR Selection ]
+.RB [ \-\-systemid
+.IR SystemID ]
.RB [ \-\-refresh ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
@@ -243,6 +245,12 @@ impact on I/O performance to the logical volume. The smallest PE is 1KiB.
The 2.4 kernel has a limitation of 2TiB per block device.
.TP
+.BR \-\-systemid " " \fISystemID
+Changes the system ID of the VG. Using this option requires caution
+because the VG may become foreign to the host running the command,
+leaving the host unable to access it. See
+.BR lvmsystemid (7).
+.TP
.BR \-\-refresh
If any logical volume in the volume group is active, reload its metadata.
This is not necessary in normal operation, but may be useful
diff --git a/man/vgcreate.8.in b/man/vgcreate.8.in
index d850659..c55dbfe 100644
--- a/man/vgcreate.8.in
+++ b/man/vgcreate.8.in
@@ -27,6 +27,8 @@ vgcreate \(em create a volume group
.IR NumberOfCopies | unmanaged | all ]
.RB [ \-s | \-\-physicalextentsize
.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
+.RB [ \-\-systemid
+.IR SystemID ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-version ]
@@ -110,7 +112,6 @@ power of 2 of at least 1 sector (where the sector size is the largest sector
size of the PVs currently used in the VG) or, if not a power of 2, at least
128KiB. For the older LVM1 format, it must be a power of 2 of at least 8KiB.
The default is 4 MiB.
-
Once this value has been set, it is difficult to change it without recreating
the volume group which would involve backing up and restoring data on any
logical volumes. However, if no extents need moving for the new
@@ -126,6 +127,16 @@ impact on I/O performance to the logical volume. The smallest PE is 1KiB
The 2.4 kernel has a limitation of 2TiB per block device.
+.TP
+.BR \-\-systemid " " \fISystemID
+Specifies the system ID that will be given to the new VG, overriding the
+system ID of the host running the command. A VG is normally created
+without this option, in which case the new VG is given the system ID of
+the host creating it. Using this option requires caution because the
+system ID of the new VG may not match the system ID of the host running
+the command, leaving the VG inaccessible to the host. See
+.BR lvmsystemid (7).
+
.SH PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the
volume group. These options are further described in the \fBpvcreate\fP(8)
9 years, 2 months