mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvconvert: read-only origin cannot be merged
When user sets snapshost origin as read-only, lvm will not allow simple merge and user needs to flip permission,
This commit is contained in:
parent
2895180058
commit
f90082ce8f
@ -2162,15 +2162,21 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd,
|
||||
log_error("Cannot merge snapshot %s into the origin %s "
|
||||
"with merging snapshot %s.",
|
||||
display_lvname(lv), display_lvname(origin),
|
||||
display_lvname(find_snapshot(origin)->lv));
|
||||
display_lvname(snap_seg->lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(origin_from_cow(lv))) {
|
||||
if (lv_is_external_origin(origin)) {
|
||||
log_error("Cannot merge snapshot %s into "
|
||||
"the read-only external origin %s.",
|
||||
display_lvname(lv),
|
||||
display_lvname(origin_from_cow(lv)));
|
||||
display_lvname(lv), display_lvname(origin));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(origin->status & LVM_WRITE)) {
|
||||
log_error("Cannot merge snapshot %s into "
|
||||
"the read-only origin %s. (Use lvchange -p rw).",
|
||||
display_lvname(lv), display_lvname(origin));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user