diff options
author | David Teigland <teigland@redhat.com> | 2015-07-10 13:49:51 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-07-10 15:53:21 -0500 |
commit | c39f3026a8280bb4c62c785138302cd1475facb6 (patch) | |
tree | cc647f47ce01a47c2c55554943d6c5248558f250 | |
parent | 222bb2b88d06a67cc25ed19332919fa339d7e831 (diff) | |
download | lvm2-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.c | 7 |
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); |