From 6b416f837f4ee71ca5705cb40fad22b26b0c664a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 10 Aug 2013 01:13:27 +0200 Subject: [PATCH] thin: support lvchange for data and metadata Support lvchange operation on stacked thin pool data and metadata volumes. --- WHATS_NEW | 1 + tools/lvchange.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 3ea87860d..bf1302321 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.101 - =================================== + Support most of lvchange operations on stacked thin pool meta/data LVs. Add ability to pvmove RAID, mirror, and thin volumes. Make lvm2-activation-generator silent unless it's in error state. Remove "mpath major is not dm major" msg for mpath component scan (2.02.94). diff --git a/tools/lvchange.c b/tools/lvchange.c index 525022f65..34e230c07 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -982,7 +982,13 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, lv_is_virtual_origin(origin = origin_from_cow(lv))) lv = origin; - if (!(lv_is_visible(lv)) && !lv_is_virtual_origin(lv)) { + if ((lv_is_thin_pool_data(lv) || lv_is_thin_pool_metadata(lv)) && + !arg_count(cmd, activate_ARG) && + !arg_count(cmd, permission_ARG) && + !arg_count(cmd, setactivationskip_ARG)) + /* Rest can be changed for stacked thin pool meta/data volumes */ + ; + else if (!(lv_is_visible(lv)) && !lv_is_virtual_origin(lv)) { log_error("Unable to change internal LV %s directly", lv->name); return ECMD_FAILED;