Two errors regarding storage

Hello, I am getting two errors that seem related to Freedombox storage. When inspecting storage via Cockpit, the boot and root partitions on the SD Card are less than half full.

  • I am on Debian GNU/Linux 10 (buster) version 19.2.
  • I’m using the Olimex kit, purchased May 2019.
  • The OS is flashed to a 64GB SD Card and I’m also using a 128GB USB drive for Syncthing.

Here’s what I’m seeing:

1.) Error getting information about root partition: Mount point / not found. This is reported by /usr/lib/python3/dist-packages/plinth/modules/storage/views.py

2.) Error opening directory “/usr/lib/arm-linux-gnueabihf/udisks2/modules”: No such file or directory. On this error, I checked and indeed there is no udisks2 directory in /usr/lib/arm-linux-gnueabihf/.

Is my system not configured properly? Maybe my storage devices are faulty? Any ideas on what’s going on with these?

Here is the copy/paste of the errors from the logs:

1.)
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.

CODE_ARGS (PlinthError(‘Mount point / not found.’),)
CODE_FILE /usr/lib/python3/dist-packages/plinth/modules/storage/views.py
CODE_FUNC warn_about_low_disk_space
CODE_LINE 101
EXCEPTION_INFO (<class ‘plinth.errors.PlinthError’>, PlinthError(‘Mount point / not found.’), <traceback object at 0xb04b2148>)
EXCEPTION_TEXT Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
LOGGER plinth.modules.storage.views
PRIORITY 3
PROCESS_NAME MainProcess
SYSLOG_IDENTIFIER /usr/bin/plinth
THREAD_NAME CP Server Thread-8
_BOOT_ID 07d64e0ccaca48ef9f509c8bcb134c51
_CAP_EFFECTIVE 0
_CMDLINE /usr/bin/python3 /usr/bin/plinth
_COMM plinth
_EXE /usr/bin/python3.7
_GID 116
_HOSTNAME freedombox
_MACHINE_ID ea13826b003746f0b285707b166a018e
_PID 479
_SELINUX_CONTEXT unconfined
_SOURCE_REALTIME_TIMESTAMP 1564959489047335
_SYSTEMD_CGROUP /system.slice/plinth.service
_SYSTEMD_INVOCATION_ID ec1ad9fb8ee8422583e61291a0ee8a5a
_SYSTEMD_SLICE system.slice
_SYSTEMD_UNIT plinth.service
_TRANSPORT journal
_UID 110
__CURSOR s=d1114b009dae45da9232a8f378140468;i=18f9;b=07d64e0ccaca48ef9f509c8bcb134c51;m=1274db42b3;t=58f52866ebb9d;x=ea3db72576d896cc
__MONOTONIC_TIMESTAMP 79269937843
__REALTIME_TIMESTAMP 1564959489047453

2.)
Error loading modules: Error opening directory “/usr/lib/arm-linux-gnueabihf/udisks2/modules”: No such file or directory

GLIB_DOMAIN udisks
PRIORITY 4
_BOOT_ID 07d64e0ccaca48ef9f509c8bcb134c51
_CAP_EFFECTIVE 3fffffffff
_CMDLINE /usr/lib/udisks2/udisksd
_COMM udisksd
_EXE /usr/lib/udisks2/udisksd
_GID 0
_HOSTNAME freedombox
_MACHINE_ID ea13826b003746f0b285707b166a018e
_PID 313
_SELINUX_CONTEXT unconfined
_SOURCE_REALTIME_TIMESTAMP 1564955631283912
_SYSTEMD_CGROUP /system.slice/udisks2.service
_SYSTEMD_INVOCATION_ID f4520eed7e824bfea30e0518526a5e36
_SYSTEMD_SLICE system.slice
_SYSTEMD_UNIT udisks2.service
_TRANSPORT journal
_UID 0
__CURSOR s=d1114b009dae45da9232a8f378140468;i=177f;b=07d64e0ccaca48ef9f509c8bcb134c51;m=118eea7639;t=58f51a07def23;x=5293eda8ca100356
__MONOTONIC_TIMESTAMP 75412174393
__REALTIME_TIMESTAMP 1564955631284003
1 Like

Thanks for reporting your issue. Though I can’t comment on the error logs you posted, I believe that your issue is related to an existing thread about removable storage. We’ve been dealing with an issue with removable storage for a few months now, and our team is still working on a solution.

Related thread:

Hope this helps.

Thanks for your response and letting me know it’s related to a current issue.

For what it’s worth, my (exFat-formatted) usb flash drive shows up fine in Cockpit and it is working well with syncthing. The root directory mentioned in error 1.) is of course on the SD Card rather than the USB drive.

Perhaps I’ll try unmounting and removing my USB drive to see if both errors cease…

1 Like

Thanks for a detailed and very helpful report.

FreedomBox tried obtain information from udisks2 to show a warning about remaining disk space in case it is low. The information return from udisks didn’t contain a partition with ‘/’ as the mount point. I don’t know a situation in which this can happen. This is probably and error that is the result of log number 2 above (the two event seem to have occurred more than 1 hour part though). Could you provide the output of udisksctl dump? (Please remove any UUIDs from the output as the could prove privacy sensitive).

The second error should not have occurred at all. The directory does not typically exist until any of udisks2 modules are installed (provided by udisks2-* packages). Checked on two different machines.

user@freedombox:~$ ls /usr/lib/arm-linux-gnueabihf/udisks2
ls: cannot access '/usr/lib/arm-linux-gnueabihf/udisks2': No such file or directory
root@mybox:/usr/lib# ls /usr/lib/x86_64-linux-gnu/udisks2
ls: cannot access '/usr/lib/x86_64-linux-gnu/udisks2': No such file or directory

After installing udisks2-btrfs:

root@mybox:/usr/lib# ls /usr/lib/x86_64-linux-gnu/udisks2/modules/libudisks2_btrfs.so 
/usr/lib/x86_64-linux-gnu/udisks2/modules/libudisks2_btrfs.so

Sunil, thanks for checking this out.

Here’s is the output of udisksctl dump:

=====================

/org/freedesktop/UDisks2/Manager:
org.freedesktop.UDisks2.Manager:
SupportedFilesystems: ext2
ext3
ext4
vfat
ntfs
exfat
xfs
reiserfs
nilfs2
btrfs
minix
udf
f2fs
swap
Version: 2.8.1

/org/freedesktop/UDisks2/block_devices/mmcblk0:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: ‘/’
Device: /dev/mmcblk0
DeviceNumber: 45824
Drive: ‘/org/freedesktop/UDisks2/drives/SL64G_0x28e19ea4’
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id:
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/mmcblk0
ReadOnly: false
Size: 63864569856
Symlinks: /dev/disk/by-id/mmc-SL64G_0x28e19ea4
/dev/disk/by-path/platform-1c0f000.mmc
UserspaceMountOptions:
org.freedesktop.UDisks2.PartitionTable:
Partitions: [’/org/freedesktop/UDisks2/block_devices/mmcblk0p2’, ‘/org/freedesktop/UDisks2/block_devices/mmcblk0p1’]
Type: dos

/org/freedesktop/UDisks2/block_devices/mmcblk0p1:
org.freedesktop.UDisks2.Block:
Configuration: [(‘fstab’, {‘fsname’: <b’UUID=xxx-xxx-xxx-xxx’>, ‘dir’: <b’/boot’>, ‘type’: <b’ext2’>, ‘opts’: <b’errors=remount-ro’>, ‘freq’: <0>, ‘passno’: <2>})]
CryptoBackingDevice: ‘/’
Device: /dev/mmcblk0p1
DeviceNumber: 45825
Drive: ‘/org/freedesktop/UDisks2/drives/SL64G_0x28e19ea4’
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
System: false
Id: by-uui
IdType: ext2
IdUUID: xxx-xxx-xxx-xxx
IdUsage: filesystem
IdVersion: 1.0
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/mmcblk0p1
ReadOnly: false
Size: 134218240
Symlinks: /dev/disk/by-id/mmc-SL64G_0x28e19ea4-part1
/dev/disk/by-partuuid/xxxxxx
/dev/disk/by-path/platform-1c0f000.mmc-part1
/dev/disk/by-uuid/xxx-xxx-xxx-xxx
UserspaceMountOptions:
org.freedesktop.UDisks2.Filesystem:
MountPoints: /boot
Size: 134217728
org.freedesktop.UDisks2.Partition:
Flags: 128
IsContained: false
IsContainer: false
Name:
Number: 1
Offset: 1048576
Size: 134218240
Table: ‘/org/freedesktop/UDisks2/block_devices/mmcblk0’
Type: 0x83
UUID: xxxxxxxxxxxxx

/org/freedesktop/UDisks2/block_devices/mmcblk0p2:
org.freedesktop.UDisks2.Block:
Configuration: [(‘fstab’, {‘fsname’: <b’UUID=ea375ed2-d6e7-49d4-9b19-a624ba09b96c’>, ‘dir’: <b’/’>, ‘type’: <b’btrfs’>, ‘opts’: <b’defaults’>, ‘freq’: <0>, ‘passno’: <1>}), (‘fstab’, {‘fsname’: <b’UUID=ea375ed2-d6e7-49d4-9b19-a624ba09b96c’>, ‘dir’: <b’/.snapshots’>, ‘type’: <b’btrfs’>, ‘opts’: <b’subvol=.snapshots’>, ‘freq’: <0>, ‘passno’: <1>})]
CryptoBackingDevice: ‘/’
Device: /dev/mmcblk0p2
DeviceNumber: 45826
Drive: ‘/org/freedesktop/UDisks2/drives/SL64G_0x28e19ea4’
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id: by-uuid-xxx-xxx-xxx-xxx
IdLabel:
IdType: btrfs
IdUUID: xxx-xxx-xxx-xxx
IdUsage: filesystem
IdVersion:
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/mmcblk0p2
ReadOnly: false
Size: 63728254976
Symlinks: /dev/disk/by-id/mmc-SL64G_0x28e19ea4-part2
/dev/disk/by-partuuid/xxxxxxxxxxx
/dev/disk/by-path/platform-1c0f000.mmc-part2
/dev/disk/by-uuid/xxxxxxxxxxxxxx
UserspaceMountOptions:
org.freedesktop.UDisks2.Filesystem:
MountPoints: /
/.snapshots
Size: 0
org.freedesktop.UDisks2.Partition:
Flags: 0
IsContained: false
IsContainer: false
Name:
Number: 2
Offset: 136314880
Size: 63728254976
Table: ‘/org/freedesktop/UDisks2/block_devices/mmcblk0’
Type: 0x83
UUID: xxxxxxxxxxxxx

/org/freedesktop/UDisks2/block_devices/sda:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: ‘/’
Device: /dev/sda
DeviceNumber: 2048
Drive: ‘/org/freedesktop/UDisks2/drives/SanDisk_Ultra_Fit_4C530001260313107400’
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id:
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/sda
ReadOnly: false
Size: 124218507264
Symlinks: /dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001260313107400-0:0
/dev/disk/by-path/platform-1c1c000.usb-usb-0:1:1.0-scsi-0:0:0:0
UserspaceMountOptions:
org.freedesktop.UDisks2.PartitionTable:
Partitions: [’/org/freedesktop/UDisks2/block_devices/sda2’, ‘/org/freedesktop/UDisks2/block_devices/sda1’]
Type: gpt

/org/freedesktop/UDisks2/block_devices/sda1:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: ‘/’
Device: /dev/sda1
DeviceNumber: 2049
Drive: ‘/org/freedesktop/UDisks2/drives/SanDisk_Ultra_Fit_4C530001260313107400’
HintAuto: true
HintIconName:
HintIgnore: true
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id: by-uuid-xxxxxxxx
IdLabel: EFI
IdType: vfat
IdUUID: xxxxxxxx
IdUsage: filesystem
IdVersion: FAT32
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/sda1
ReadOnly: false
Size: 209715200
Symlinks: /dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001260313107400-0:0-part1
/dev/disk/by-label/EFI
/dev/disk/by-partlabel/EFI\x20System\x20Partition
/dev/disk/by-partuuid/xxxxxxxxxxxxx
/dev/disk/by-path/platform-1c1c000.usb-usb-0:1:1.0-scsi-0:0:0:0-part1
/dev/disk/by-uuid/xxxxxxxxx
UserspaceMountOptions:
org.freedesktop.UDisks2.Filesystem:
MountPoints:
Size: 0
org.freedesktop.UDisks2.Partition:
Flags: 0
IsContained: false
IsContainer: false
Name: EFI System Partition
Number: 1
Offset: 20480
Size: 209715200
Table: ‘/org/freedesktop/UDisks2/block_devices/sda’
Type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
UUID: xxxxxxxxxxxxx

/org/freedesktop/UDisks2/block_devices/sda2:
org.freedesktop.UDisks2.Block:
Configuration: [(‘fstab’, {‘fsname’: <b’UUID=xxxxxxxxx’>, ‘dir’: <b’/home/woods/usb1’>, ‘type’: <b’exfat’>, ‘opts’: <b’defaults’>, ‘freq’: <0>, ‘passno’: <0>})]
CryptoBackingDevice: ‘/’
Device: /dev/sda2
DeviceNumber: 2050
Drive: ‘/org/freedesktop/UDisks2/drives/SanDisk_Ultra_Fit_4C530001260313107400’
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id: by-uuid-xxxxxxxxx
IdLabel: usb1
IdType: exfat
IdUUID: 5CF5-4E15
IdUsage: filesystem
IdVersion: 1.0
MDRaid: ‘/’
MDRaidMember: ‘/’
PreferredDevice: /dev/sda2
ReadOnly: false
Size: 124006694912
Symlinks: /dev/disk/by-id/usb-SanDisk_Ultra_Fit_4C530001260313107400-0:0-part2
/dev/disk/by-label/usb1
/dev/disk/by-partuuid/xxxxxxx
/dev/disk/by-path/platform-1c1c000.usb-usb-0:1:1.0-scsi-0:0:0:0-part2
/dev/disk/by-uuid/xxxxxxxx
UserspaceMountOptions:
org.freedesktop.UDisks2.Filesystem:
MountPoints: /home/woods/usb1
Size: 0
org.freedesktop.UDisks2.Partition:
Flags: 0
IsContained: false
IsContainer: false
Name:
Number: 2
Offset: 210763776
Size: 124006694912
Table: ‘/org/freedesktop/UDisks2/block_devices/sda’
Type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
UUID: xxxxxxxxxxxxxxxxx

/org/freedesktop/UDisks2/drives/SL64G_0x28e19ea4:
org.freedesktop.UDisks2.Drive:
CanPowerOff: false
Configuration: {}
ConnectionBus: sdio
Ejectable: false
Id: SL64G-0x28e19ea4
Media: flash_sd
MediaAvailable: true
MediaChangeDetected: true
MediaCompatibility: flash_sd
MediaRemovable: true
Model: SL64G
Optical: false
OpticalBlank: false
OpticalNumAudioTracks: 0
OpticalNumDataTracks: 0
OpticalNumSessions: 0
OpticalNumTracks: 0
Removable: true
Revision:
RotationRate: 0
Seat: seat0
Serial: 0x28e19ea4
SiblingId:
Size: 63864569856
SortKey: 00coldplug/12removable/mmcblk0
TimeDetected: 1564880196860655
TimeMediaDetected: 1564880196860655
Vendor:
WWN:

/org/freedesktop/UDisks2/drives/SanDisk_Ultra_Fit_4C530001260313107400:
org.freedesktop.UDisks2.Drive:
CanPowerOff: true
Configuration: {}
ConnectionBus: usb
Ejectable: true
Id: SanDisk-Ultra-Fit-4C530001260313107400
Media:
MediaAvailable: true
MediaChangeDetected: true
MediaCompatibility:
MediaRemovable: true
Model: Ultra Fit
Optical: false
OpticalBlank: false
OpticalNumAudioTracks: 0
OpticalNumDataTracks: 0
OpticalNumSessions: 0
OpticalNumTracks: 0
Removable: true
Revision: 1.00
RotationRate: -1
Seat: seat0
Serial: 4C530001260313107400
SiblingId: /sys/devices/platform/soc@1c00000/1c1c000.usb/usb3/3-1/3-1:1.0
Size: 124218507264
SortKey: 00coldplug/12removable/sd____a
TimeDetected: 1564880207018562
TimeMediaDetected: 1564880207018562
Vendor: SanDisk
WWN:

Thanks for your help!

Everything looks okay to me in this output. Specifically, there is a object whos “IdUsage: filesystem” and “MountsPoints: /”. So, I am staring to wonder if that was a one-time error due to an incomplete state of udisks2 (perhaps after immediately starting).

  • Does the error shown in the log occur everytime you visit the system or storage page?
  • Did you see that error multiple times?
  • If you visit the storage app, does that result in this error?

Sunil, with regards to your questions:

  • There are no additional errors reported when I hit the system or storage pages in Cockpit.
  • The error does keep occuring.
  • I do get the error for “Mount point / not found” when I open the Storage app.

Here’s a partial log. The last 3 errors came up when I visited the Storage app. I don’t open this app, ordinarily, so the prior instances must come from something else.

================

August 8, 2019

01:59
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth
3

01:56
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth
3

01:38
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth

01:29
This incident has been reported.
cockpit-bridge

01:29
Error executing command as another user: Not authorized
cockpit-bridge

01:29
woods: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/run/user/10000] [COMMAND=/usr/bin/cockpit-bridge --privileged]
pkexec

01:29
cannot reauthorize identity(s): unix-user:fbx
cockpit-bridge

01:29
invalid or unusable locale: en_US.UTF-8
cockpit-bridge

01:29
pam_ssh_add: Failed adding some keys
cockpit-session

August 7, 2019

18:14
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth

18:10
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth
2

17:52
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth

16:11
This incident has been reported.
cockpit-bridge

16:11
Error executing command as another user: Not authorized
cockpit-bridge

16:11
woods: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/run/user/10000] [COMMAND=/usr/bin/cockpit-bridge --privileged]
pkexec

16:11
cannot reauthorize identity(s): unix-user:fbx
cockpit-bridge

16:11
invalid or unusable locale: en_US.UTF-8
cockpit-bridge

16:11
pam_ssh_add: Failed adding some keys
cockpit-session

16:10
Error getting information about root partition: Mount point / not found. Traceback (most recent call last): File “/usr/lib/python3/dist-packages/plinth/modules/storage/views.py”, line 98, in warn_about_low_disk_space root_info = get_disk_info(’/’) File “/usr/lib/python3/dist-packages/plinth/modules/storage/init.py”, line 150, in get_disk_info raise PlinthError(‘Mount point {} not found.’.format(mount_point)) plinth.errors.PlinthError: Mount point / not found.
/usr/bin/plinth

@bebop, this almost certainly looks like a bug in FreedomBox’s usage of UDisks2 API given the previous output of udisksctl and this error. We can investigate and fix this. Could you run the following script on your machine and post the results? (Sorry to drag you into a debug session :slight_smile: )

#!/usr/bin/python3

import importlib

try:
    import gi as package
    package_name = 'gi'
except ImportError:
    import pgi as package
    package_name = 'pgi'

package.require_version('UDisks', '2.0')

udisks = importlib.import_module(package_name + '.repository.UDisks')

client = udisks.Client.new_sync()
object_manager = client.get_object_manager()
devices = []

for obj in object_manager.get_objects():

    if not obj.get_block():
        continue

    block = obj.get_block()

    if block.props.id_usage != 'filesystem':
        continue

    device = {
        'device': block.props.device,
        'label': block.props.id_label,
        'size': block.props.size,
        'filesystem_type': block.props.id_type,
        'is_removable': not block.props.hint_system
    }
    try:
        device['mount_point'] = obj.get_filesystem().props.mount_points[0]
    except Exception:
        continue

    print(device)

Save the above into a file like test.py and run the command python3 test.py.

Sunil, thanks for looking into this. Here’s the output as requested.

In case it might be useful, I’m also including my /etc/fsab file. I added the line for /dev/sda2 (perhaps incorrectly?) and the others lines were generated by the system.


{‘device’: ‘/dev/mmcblk0p2’, ‘label’: ‘’, ‘size’: 63728254976, ‘filesystem_type’: ‘btrfs’, ‘is_removable’: True, ‘mount_point’: ‘/’}
{‘device’: ‘/dev/mmcblk0p1’, ‘label’: ‘’, ‘size’: 134218240, ‘filesystem_type’: ‘ext2’, ‘is_removable’: True, ‘mount_point’: ‘/boot’}
{‘device’: ‘/dev/sda2’, ‘label’: ‘usb1’, ‘size’: 124006694912, ‘filesystem_type’: ‘exfat’, ‘is_removable’: True, ‘mount_point’: ‘/home/woods/usb1’}


UUID=xxxx-xxx-xxx-xxx-xxxxxx / btrfs defaults 0 1
UUID=xxxx-xxx-xxx-xxx-xxxxxx /boot ext2 errors=remount-ro 0 2
UUID=xxx-xxx /home/woods/usb1 exfat defaults 0 0
UUID=xxxx-xxx-xxx-xxx-xxxxxx /.snapshots btrfs subvol=.snapshots 0 1