summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-07-10 13:49:51 -0500
committerDavid Teigland <teigland@redhat.com>2015-07-10 15:53:21 -0500
commitc39f3026a8280bb4c62c785138302cd1475facb6 (patch)
treecc647f47ce01a47c2c55554943d6c5248558f250
parent222bb2b88d06a67cc25ed19332919fa339d7e831 (diff)
downloadlvm2-c39f3026a8280bb4c62c785138302cd1475facb6.tar.gz
vgexport: do not allow lockd VG to be exported
vgexport and vgimport have no use for a shared VG.
-rw-r--r--tools/vgexport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/vgexport.c b/tools/vgexport.c
index 6d5b4f645..7e90e5c14 100644
--- a/tools/vgexport.c
+++ b/tools/vgexport.c
@@ -22,6 +22,13 @@ static int vgexport_single(struct cmd_context *cmd __attribute__((unused)),
{
struct pv_list *pvl;
+ /* vgexport/vgimport have to use with shared VGs. */
+ if (is_lockd_type(vg->lock_type)) {
+ log_error("Volume group \"%s\" has lock_type %s that cannot be exported",
+ vg_name, vg->lock_type);
+ goto bad;
+ }
+
if (lvs_in_vg_activated(vg)) {
log_error("Volume group \"%s\" has active logical volumes",
vg_name);