summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2023-03-22 13:05:43 -0500
committerDavid Teigland <teigland@redhat.com>2023-05-11 11:02:52 -0500
commitfd6e113bba5fed5ee41152cde33220294c24ce2b (patch)
tree75da977bb817d2688056719c65b9e02c1ae6f4ec /lib
parent05c2b10c5d0a99993430ffbcef684a099ba810ad (diff)
downloadlvm2-fd6e113bba5fed5ee41152cde33220294c24ce2b.tar.gz
raidintegrity: allow snapshots
Diffstat (limited to 'lib')
-rw-r--r--lib/activate/dev_manager.c6
-rw-r--r--lib/metadata/integrity_manip.c5
-rw-r--r--lib/metadata/snapshot_manip.c2
3 files changed, 5 insertions, 8 deletions
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index ac3f01718..1f4d7c98b 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -3039,7 +3039,11 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
if (((seg_type(seg, s) == AREA_PV) && _bad_pv_area(seg, s)) ||
((seg_type(seg, s) == AREA_LV) && !seg_lv(seg, s))) {
if (!cmd->partial_activation) {
- if (!cmd->degraded_activation || !lv_is_raid_type(seg->lv)) {
+ if (!cmd->degraded_activation ||
+ (!lv_is_raid_type(seg->lv) &&
+ !lv_is_integrity(seg->lv) &&
+ !lv_is_integrity_metadata(seg->lv) &&
+ !lv_is_integrity_origin(seg->lv))) {
log_error("Aborting. LV %s is incomplete and --activationmode partial was not specified.",
display_lvname(seg->lv));
return 0;
diff --git a/lib/metadata/integrity_manip.c b/lib/metadata/integrity_manip.c
index d71fbaeb6..6b507f7e9 100644
--- a/lib/metadata/integrity_manip.c
+++ b/lib/metadata/integrity_manip.c
@@ -508,11 +508,6 @@ int lv_add_integrity_to_raid(struct logical_volume *lv, struct integrity_setting
return 0;
}
- if (lv_is_origin(lv)) {
- log_error("Integrity cannot be added to snapshot origins.");
- return 0;
- }
-
seg_top = first_seg(lv);
area_count = seg_top->area_count;
diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c
index 822b8da77..b34079d08 100644
--- a/lib/metadata/snapshot_manip.c
+++ b/lib/metadata/snapshot_manip.c
@@ -423,8 +423,6 @@ int validate_snapshot_origin(const struct logical_volume *origin_lv)
}
} else if (lv_is_raid_type(origin_lv) && !lv_is_raid(origin_lv)) {
err = "raid subvolumes";
- } else if (lv_is_raid(origin_lv) && lv_raid_has_integrity((struct logical_volume *)origin_lv)) {
- err = "raid with integrity";
}
out: