storage: Remove rule to not automount system disks with no paritions

This rule imported originally from udiskie's defaults seems somewhat arbitrary.
We attach a SATA drive with partitions, it mounts them. However, if the entire
drive is a file system, it does not auto-mount.

Tests performed:

- In VirtualBox, attach a SATA drive. Create two partitions and filesystems in
them. Both filesystems are auto-mounted.

- In VirtualBox, attach a SATA drive. Format the entire drive as a filesystem.
The filesystem is auto-mounted.

- Same behavior is observed with loop devices.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-02 11:13:05 -07:00 committed by James Valleroy
parent d4ce843e22
commit 8c05fb0722
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -254,16 +254,6 @@ def _consider_for_mounting(object_path):
block_device.id, block_device.preferred_device)
return
# Ignore non-external devices that don't have partition table (top-level
# filesystem). If the device is backed by a crypto device, still handle it.
# XXX: This rule is from udiskie. Should we keep it?
partition = Partition(object_path)
if block_device.hint_system and not partition.number and \
block_device.crypto_backing_device == '/':
logger.info('Ignoring auto-mount of top-level internal device: %s %s',
block_device.id, block_device.preferred_device)
return
_mount(object_path)