diff --git a/WHATS_NEW b/WHATS_NEW index 53f3fe93f..b2b7c356b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.98 - ================================= + Prohibit not yet supported change of thin-pool to read-only. Support creation of read-only thin volumes (lvcreate -p r). Using autoextend percent 0 for thin pool fails 'lvextend --use-policies'. Introduce blkdeactivate script. diff --git a/tools/lvchange.c b/tools/lvchange.c index b7876721b..85253ef2e 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -51,6 +51,12 @@ static int lvchange_permission(struct cmd_context *cmd, return 0; } + if (!(lv_access & LVM_WRITE) && lv_is_thin_pool(lv)) { + log_error("Change permissions of thin pool \"%s\" not " + "yes supported.", lv->name); + return 0; + } + if (lv_access & LVM_WRITE) { lv->status |= LVM_WRITE; log_verbose("Setting logical volume \"%s\" read/write",