summaryrefslogtreecommitdiff
path: root/tools/tools.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2017-07-12 16:03:41 -0500
committerDavid Teigland <teigland@redhat.com>2017-07-24 14:12:08 -0500
commitf611b68f3c02b9af2521d7ea61061af3709fe87c (patch)
tree013b6a630464e60282d0946906f75b0db834109d /tools/tools.h
parent876c4a1b3bdf2d2f9202438a406a803efa01bf9a (diff)
downloadlvm2-f611b68f3c02b9af2521d7ea61061af3709fe87c.tar.gz
vgchange: separate change locktype and allow recovery
Add an independent command definition for "vgchange --locktype", and split the implementation out of the set of common metadata changes. It is unlike normal metadata changes, and can only be run by itself. (Changing the lock type is similar in principle to changing the VG name or the VG system ID; it effects the ability of any host to see or access the VG.) At some point this command lost the ability to forcibly change the lock type of a shared VG to "none" (making it a local VG). This can be necessary to repair shared VGs (e.g. recovery steps that occur in vg_read are disabled for shared VGs because they are not locked properly, or recovering sanlock locks when the PV holding them is lost.) "vgchange --locktype none --lockopt force VG" is used as the method of forcing the shared VG to become local so that it can be repaired.
Diffstat (limited to 'tools/tools.h')
-rw-r--r--tools/tools.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/tools.h b/tools/tools.h
index 95431479d..8255cdcef 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -223,6 +223,8 @@ int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg,
int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg);
+int vgchange_locktype_cmd(struct cmd_context *cmd, int argc, char **argv);
+
struct lv_prop *get_lv_prop(int lvp_enum);
struct lv_type *get_lv_type(int lvt_enum);
struct command *get_command(int cmd_enum);