Skip to content

Commit 93bc374

Browse files
committed
improve detection/logging
Signed-off-by: Zen <[email protected]>
1 parent e708e3b commit 93bc374

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ugrd/fs/mounts.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'desultory'
2-
__version__ = '4.16.1'
2+
__version__ = '4.16.2'
33

44
from pathlib import Path
55
from zenlib.util import contains, pretty_print
@@ -328,7 +328,10 @@ def _autodetect_dm(self, mountpoint, device=None) -> None:
328328
return
329329

330330
if source_device not in self['_blkid_info']:
331-
raise FileNotFoundError("[%s] No blkdid info for virtual device: %s" % (mountpoint, source_device))
331+
device_name = source_device.split('/')[-1]
332+
mapped_device = f'/dev/mapper/{device_name}'
333+
if mapped_device not in self['_blkid_info']:
334+
raise FileNotFoundError("[%s] No blkid info for virtual device: %s" % (mountpoint, device_name))
332335

333336
self.logger.info("[%s] Detected virtual block device: %s" % (mountpoint, source_device))
334337
source_device = Path(source_device)

0 commit comments

Comments
 (0)