From 2fc1fc3a93783fa715a0c833e12962194674b8b1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 8 Oct 2012 11:23:52 +0200 Subject: [PATCH] thin: allow to create read-only thin-volumes Useful for i.e. read-only thin snapshots. --- WHATS_NEW | 1 + tools/lvcreate.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 2780834fe..53f3fe93f 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.98 - ================================= + Support creation of read-only thin volumes (lvcreate -p r). Using autoextend percent 0 for thin pool fails 'lvextend --use-policies'. Introduce blkdeactivate script. Implement devices/global_filter (affects lvmetad). diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 53c49406e..55b6a2c6c 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -619,11 +619,6 @@ static int _read_activation_params(struct lvcreate_params *lp, struct cmd_contex lp->permission = arg_uint_value(cmd, permission_ARG, LVM_READ | LVM_WRITE); - if (lp->thin && !(lp->permission & LVM_WRITE)) { - log_error("Read-only thin volumes are not currently supported."); - return 0; - } - /* Must not zero read only volume */ if (!(lp->permission & LVM_WRITE)) lp->zero = 0; -- 2.43.5