diff options
author | Milan Broz <mbroz@redhat.com> | 2010-06-03 12:45:05 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2010-06-03 12:45:05 +0000 |
commit | 31943693c7947a9a8971b48176ac7fc222d4dacc (patch) | |
tree | 0c49218d5fc84ff42a69037e7cb0a4f089f3b41e /tools/toollib.c | |
parent | e9a87f2e16c37da6bfa23a9b8bcecff9012c9abe (diff) | |
download | lvm2-31943693c7947a9a8971b48176ac7fc222d4dacc.tar.gz lvm2-31943693c7947a9a8971b48176ac7fc222d4dacc.tar.xz lvm2-31943693c7947a9a8971b48176ac7fc222d4dacc.zip |
Require partial option in lvchange --refresh for partials LVs.
We must not refresh LV if some PVs are missing and partial activation
was not requested.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=598886
Diffstat (limited to 'tools/toollib.c')
-rw-r--r-- | tools/toollib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/toollib.c b/tools/toollib.c index 4022a328..e6791e23 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1248,6 +1248,12 @@ int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv) { int r = 0; + if (!cmd->partial_activation && (lv->status & PARTIAL_LV)) { + log_error("Refusing refresh of partial LV %s. Use --partial to override.", + lv->name); + goto out; + } + r = suspend_lv(cmd, lv); if (!r) goto_out; |