diff options
author | David Teigland <teigland@redhat.com> | 2023-03-17 16:39:48 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2023-04-05 14:24:07 -0500 |
commit | 390ff5be2fd9dda47f2bfd2db96de64acc925002 (patch) | |
tree | fe69ed734cd6921469be34be23dfbf8a3cdc49cf /tools/pvmove.c | |
parent | ebbc3f7ab31e8026499bddd93cde4db4921d2132 (diff) | |
download | lvm2-390ff5be2fd9dda47f2bfd2db96de64acc925002.tar.gz |
raidintegrity: allow writecache and cache
Allow writecache|cache over raid+integrity LV.
Diffstat (limited to 'tools/pvmove.c')
-rw-r--r-- | tools/pvmove.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/pvmove.c b/tools/pvmove.c index ed92f3ce4..ebffe9acd 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -645,6 +645,14 @@ static int _pvmove_setup_single(struct cmd_context *cmd, log_error("pvmove not allowed on raid LV with integrity."); return ECMD_FAILED; } + + if (lv_is_cache(lv) || lv_is_writecache(lv)) { + struct logical_volume *lv_orig = seg_lv(first_seg(lv), 0); + if (lv_is_raid(lv_orig) && lv_raid_has_integrity(lv_orig)) { + log_error("pvmove not allowed on raid LV with integrity."); + return ECMD_FAILED; + } + } } /* |