Do not try to use zRAM devices for anything
These devices are mapped into memory, but nonetheless can appear in lsblk output. Ignore them explicitly. Change-Id: I2bb595ef29abdc98bd887bdf41c3c7f64cc3a7e6
This commit is contained in:
parent
570584f9ab
commit
88796a8936
@ -305,6 +305,12 @@ def list_all_block_devices(block_type='disk',
|
||||
raise errors.BlockDeviceError(
|
||||
'%s must be returned by lsblk.' % ', '.join(sorted(missing)))
|
||||
|
||||
# NOTE(dtantsur): zRAM devices can appear in the output of lsblk, but
|
||||
# we cannot do anything useful with them.
|
||||
if device['KNAME'].startswith('zram'):
|
||||
LOG.debug('Skipping zRAM device %s', device)
|
||||
continue
|
||||
|
||||
name = os.path.join('/dev', device['KNAME'])
|
||||
|
||||
try:
|
||||
|
@ -137,7 +137,8 @@ BLK_DEVICE_TEMPLATE = (
|
||||
' ROTA="0" TYPE="disk"\n'
|
||||
'KNAME="sdd" MODEL="NWD-BLP4-1600 " SIZE="1765517033472" '
|
||||
' ROTA="0" TYPE="disk"\n'
|
||||
'KNAME="loop0" MODEL="" SIZE="109109248" ROTA="1" TYPE="loop"'
|
||||
'KNAME="loop0" MODEL="" SIZE="109109248" ROTA="1" TYPE="loop"\n'
|
||||
'KNAME="zram0" MODEL="" SIZE="" ROTA="0" TYPE="disk"'
|
||||
)
|
||||
|
||||
# NOTE(pas-ha) largest device is 1 byte smaller than 4GiB
|
||||
|
4
releasenotes/notes/no-zram-78cc6583f4f90a9c.yaml
Normal file
4
releasenotes/notes/no-zram-78cc6583f4f90a9c.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
No longer tries to use zRAM devices for anything.
|
Loading…
Reference in New Issue
Block a user