diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-09-18 18:51:58 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-09-18 18:51:58 +0000 |
commit | 08b481bbc5cf414493a5f61fed91ef7c7e27a534 (patch) | |
tree | ecd82c57aa2fb758cb44816f920b84347d60aa66 /tools/lvresize.c | |
parent | bb875bb9e4a5ae9ac1e1924efa9242ed625844a6 (diff) | |
download | lvm2-08b481bbc5cf414493a5f61fed91ef7c7e27a534.tar.gz lvm2-08b481bbc5cf414493a5f61fed91ef7c7e27a534.tar.xz lvm2-08b481bbc5cf414493a5f61fed91ef7c7e27a534.zip |
Prevent resizing an LV while lvconvert is using it.
Diffstat (limited to 'tools/lvresize.c')
-rw-r--r-- | tools/lvresize.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lvresize.c b/tools/lvresize.c index 4911da95..0a8bf7da 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -308,6 +308,11 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg, return ECMD_FAILED; } + if (lv->status & CONVERTING) { + log_error("Can't resize %s while lvconvert in progress", lv->name); + return ECMD_FAILED; + } + alloc = arg_uint_value(cmd, alloc_ARG, lv->alloc); if (lp->size) { |