From 0ec78e98624fb1188fbcda7a396d875ea959ce29 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 18 Nov 2004 19:49:48 +0000 Subject: [PATCH] Prevent snapshot origin resizing. --- WHATS_NEW | 2 ++ tools/lvresize.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 8224ddada..8e536238a 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.00.26 - ===================================== + Prevent snapshot origin resizing. + Improve a vgremove error message. Update some man pages. Allow y/n with -ae args (exclusive activation). Fixes to lvcreate vgname parsing. diff --git a/tools/lvresize.c b/tools/lvresize.c index 8ffd2225a..f8ca36c83 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -180,6 +180,11 @@ static int _lvresize(struct cmd_context *cmd, struct lvresize_params *lp) return ECMD_FAILED; } + if (lv_is_origin(lv)) { + log_error("Snapshot origin volumes cannot be resized yet."); + return ECMD_FAILED; + } + alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, lv->alloc); if (lp->size) {