Trigger udev rescan if pv_dev disappears
Workaround for kernel by in Ubuntu 20.04 LTS. When using by-dname device paths with MAAS and bcache, the pvcreate operation results in the by-dname entry for the block device being deleted. The subsequent vgcreate then fails as the path cannot be found. Trigger a rescan of block devices if the pv_dev path does not exists after the pvcreate operation. Change-Id: If7e11f6bd1effd2d5fc2dc5abbaba6865104006f Depends-On: Ifb16c47ae5ff316cbcfc3798de3446a3774fa012 Related-Bug: 1878752
This commit is contained in:
parent
8daad68ebd
commit
b1aab5d0e1
|
@ -1957,6 +1957,9 @@ def _allocate_logical_volume(dev, lv_type, osd_fsid,
|
|||
vg_name = None
|
||||
if not lvm.is_lvm_physical_volume(pv_dev):
|
||||
lvm.create_lvm_physical_volume(pv_dev)
|
||||
if not os.path.exists(pv_dev):
|
||||
# NOTE: trigger rescan to work around bug 1878752
|
||||
rescan_osd_devices()
|
||||
if shared:
|
||||
vg_name = 'ceph-{}-{}'.format(lv_type,
|
||||
str(uuid.uuid4()))
|
||||
|
|
Loading…
Reference in New Issue