From 7e5a69bcd2ea398c78aef165ea0aaa17548b6780 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 18 Aug 2015 00:18:51 +0200 Subject: [PATCH] ceph-disk: is_held must ignore multipath devices Always return an empty list when is_held is called on a multipath device. The dmcrypt logic base decisions depending on the holders/slaves relationship. Such relationships can also exists for multipath devices but do not have the same semantic. http://tracker.ceph.com/issues/11881 Fixes: #11881 Signed-off-by: Loic Dachary --- src/ceph-disk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ceph-disk b/src/ceph-disk index 7226dd51962d2..fd0ca4822d933 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -633,6 +633,9 @@ def is_held(dev): Check if a device is held by another device (e.g., a dm-crypt mapping) """ assert os.path.exists(dev) + if is_mpath(dev): + return [] + dev = os.path.realpath(dev) base = get_dev_name(dev) -- 2.39.5