mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
Merge pull request #43628 from pcuzner/cephadm-remove-zram-devices
cephadm: exclude zram and cdrom from device list Reviewed-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
commit
a5cdb21017
@ -6805,6 +6805,7 @@ class HostFacts():
|
||||
_disk_vendor_workarounds = {
|
||||
'0x1af4': 'Virtio Block Device'
|
||||
}
|
||||
_excluded_block_devices = ('sr', 'zram', 'dm-')
|
||||
|
||||
def __init__(self, ctx: CephadmContext):
|
||||
self.ctx: CephadmContext = ctx
|
||||
@ -6844,7 +6845,7 @@ class HostFacts():
|
||||
# type: () -> List[str]
|
||||
"""Determine the list of block devices by looking at /sys/block"""
|
||||
return [dev for dev in os.listdir('/sys/block')
|
||||
if not dev.startswith('dm')]
|
||||
if not dev.startswith(HostFacts._excluded_block_devices)]
|
||||
|
||||
def _get_devs_by_type(self, rota='0'):
|
||||
# type: (str) -> List[str]
|
||||
|
Loading…
Reference in New Issue
Block a user