From 5643f60b4d45feb4e135997c43dcd8035cd50856 Mon Sep 17 00:00:00 2001 From: Antony Cleave Date: Mon, 6 Nov 2017 12:20:17 +0000 Subject: [PATCH] Fixes creation of mirrored volumes due to wrong type new verions of lvcreate change the default mirror format to RAID1 vs the old style (mirror). Cinder expects the old style mirror as --mirrorlog mirrored is specified and this is only supported on the mirror type, not raid1. To fix this add --type=mirror to the lvcreate syntax when lvm_mirrors is > 0 and -m is specified. Closes-bug: #1730375 Change-Id: I72e2bd3e780b1dfbc4a3716bfd370ea8d0e28e96 --- cinder/brick/local_dev/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 9444558399f..c16736a894a 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -549,7 +549,7 @@ class LVM(executor.Executor): '-L', size_str] if mirror_count > 0: - cmd.extend(['-m', mirror_count, '--nosync', + cmd.extend(['--type=mirror', '-m', mirror_count, '--nosync', '--mirrorlog', 'mirrored']) terras = int(size_str[:-1]) / 1024.0 if terras >= 1.5: