1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

lvconvert: suppport vdo raid conversion also through vpool

User could directly use 'vdopool' LV name for conversion into raid.
(lvconvert --type raid1 vg/vdopool)
This commit is contained in:
Zdenek Kabelac 2020-09-23 14:44:44 +02:00
parent 50a37948b5
commit 90c50c1b53

View File

@ -1790,6 +1790,9 @@ static int _lvconvert_raid_types(struct cmd_context *cmd, struct logical_volume
if (lv_is_cache(lv))
lv = seg_lv(first_seg(lv), 0);
if (lv_is_vdo_pool(lv))
return _lvconvert_raid_types(cmd, seg_lv(first_seg(lv), 0), lp);
if (lv_is_mirror(lv)) {
ret = _convert_mirror(cmd, lv, lp);
goto out;
@ -5064,6 +5067,7 @@ static int _lvconvert_raid_types_check(struct cmd_context *cmd, struct logical_v
!lv_is_cache_pool_data(lv) &&
!lv_is_thin_pool_metadata(lv) &&
!lv_is_thin_pool_data(lv) &&
!lv_is_vdo_pool_data(lv) &&
!lv_is_used_cache_pool(lv) &&
!lv_is_mirrored(lv) &&
!lv_is_raid(lv))