1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00

lvconvert: can't create cachepool with RAID1 metadata SubLV

Trying to convert an exiting RAID1 LV to cache metadata SubLV
fails because of missing exclusive activation during wiping.

Solve by activating the RAID1 metadata SubLV exclusively.

Resolves: rhbz1698866
This commit is contained in:
Heinz Mauelshagen 2019-04-12 21:27:30 +02:00
parent 03d6cfdd99
commit 699bf86090

View File

@ -3167,8 +3167,8 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
if (zero_metadata) {
metadata_lv->status |= LV_ACTIVATION_SKIP;
if (!activate_lv(cmd, metadata_lv)) {
log_error("Aborting. Failed to activate metadata lv.");
if (!activate_lv_excl_local(cmd, metadata_lv)) {
log_error("Aborting. Failed to locally activate metadata lv.");
goto bad;
}
metadata_lv->status &= ~LV_ACTIVATION_SKIP;