Merge pull request #251 from CanonicalLtd/mwhudson/recognise-virtio-disk

do not filter block devices by major
This commit is contained in:
Michael Hudson-Doyle 2017-10-06 10:02:56 +13:00 committed by GitHub
commit bb8c619282
1 changed files with 1 additions and 2 deletions

View File

@ -318,12 +318,11 @@ class FilesystemModel(object):
def probe(self):
storage = self.prober.get_storage()
VALID_MAJORS = ['8', '253']
currently_mounted = self._get_system_mounted_disks()
for path, data in storage.items():
if path in currently_mounted:
continue
if data['DEVTYPE'] == 'disk' and data['MAJOR'] in VALID_MAJORS:
if data['DEVTYPE'] == 'disk' and not data["DEVPATH"].startswith('/devices/virtual'):
#log.debug('disk={}\n{}'.format(
# path, json.dumps(data, indent=4, sort_keys=True)))
info = self.prober.get_storage_info(path)