Astdiskd¶
Astdiskd is responsible for:
Detecting newly mounted disk drives
Detecting the removal of drives
Communicating a list of currently mounted drives to other components.
Drive Detection¶
Astdiskd communicates with UDisks 2 over DBus to receive information about the mounted volumes on the system.
On startup, it reads disk information from the UDisks managed objects at /org/freedesktop/UDisks2/block_devices/
.
It listens for job signals in the path /org/freedesktop/UDisks2/jobs/
, dispatching a task if the job is filesystem-mount
or cleanup
.
This relies on another program automatically mounting drives that are inserted, and ensuring that DBus notices them. UDiskie 2 is recommended.
DFeet is useful for observing and debugging the DBus interactions. Python-dbus-next is the pure-python library that is used to communicate with DBus.
Astdiskd Data Structures and Classes¶
- class astoria.astdiskd.DiskManager(verbose, config_file)[source]¶
Astoria Disk Manager.
- name = 'astdiskd'¶
- property offline_status: DiskManagerMessage¶
Status to publish when the manager goes offline.
This status should ensure that any other components relying on this data go into a safe state.
- class astoria.common.ipc.DiskManagerMessage(**data)[source]¶
Status message for Disk Manager.
Published to /astoria/astdiskd