Generated by GPT-5-mini| udisks2 | |
|---|---|
| Name | udisks2 |
| Author | Red Hat |
| Developer | freedesktop.org |
| Released | 2011 |
| Programming language | C (programming language) |
| Operating system | Linux kernel |
| License | GPLv2 |
udisks2
udisks2 is a Linux storage management daemon and service that provides a high-level D-Bus API for managing block devices, filesystems, and storage media. It is designed to mediate device discovery, partition handling, mount/unmount operations, and interaction with removable media, targeting desktop environments and system services. The project operates within the freedesktop.org ecosystem and is widely used by distributions such as Fedora (operating system), Ubuntu (operating system), and Debian to expose storage functionality to desktop environments like GNOME and KDE Plasma.
udisks2 acts as a userspace layer between the kernel-level device nodes managed by Linux kernel subsystems (such as udev and sysfs) and higher-level consumers, including desktop environments, file managers, and system utilities. It replaces earlier implementations to offer a more modular and policy-driven approach compatible with systemd components. By providing D-Bus methods and signals, it standardizes interaction for projects like GNOME Files (formerly Nautilus), Dolphin (file manager), and utilities created by Red Hat contributors.
The architecture centers on a daemon process exposing objects on the D-Bus session and system buses, interfacing with kernel abstractions such as block devices, partitions, and loopback devices. Core components include the main daemon, a set of backend plugins, device object representations, and helper utilities. udisks2 leverages libraries and specifications from freedesktop.org including D-Bus interfaces influenced by projects like Polkit for authorization and systemd-logind for session handling. Integration with lower-level tools like smartctl (from smartmontools) and filesystem-specific utilities enables capability detection for devices formatted with filesystems supported by ext4, NTFS, or FAT32 standards.
Features include enumerating block devices, creating and deleting partitions, formatting filesystems, mounting and unmounting devices, and querying device attributes such as size, vendor, model, and SMART status. It supports handling of removable media ejection, optical disc operations, and loop devices for image files used by virtual machine managers such as QEMU. udisks2 exposes information conforming to udev properties populated by udev rules and interacts with storage management tools like LVM (Logical Volume Manager) and Device Mapper when available. It also provides user-friendly actions for desktop integration, enabling auto-mount behavior used by GNOME Shell and KDE Plasma Workspace.
Administrators and desktop applications interact with the service via the D-Bus API or command-line frontends that ship with many distributions. Typical tasks include mounting partitions for users of Ubuntu (operating system), formatting USB keys for distribution images by contributors to Debian or Fedora (operating system), and scripting device preparation for deployment tools used by Linux Foundation projects. Policy for who may perform operations is governed through authorization agents such as Polkit and system session management by logind. Operators can integrate udisks2 actions into installers like Calamares or system provisioning workflows used by Canonical and Red Hat.
The public API is a set of D-Bus interfaces that expose methods, properties, and signals representing objects for block devices, filesystems, and jobs. Client libraries in languages with D-Bus bindings (for example, bindings used in GNOME components written in C (programming language) or Python (programming language)) consume these interfaces to implement GUI actions in file managers such as Nautilus and Thunar (file manager). The API design allows integration with container and virtualization stacks like libvirt and QEMU for attaching storage to virtual machines. Projects building installers, backup tools, or hardware management utilities often rely on these interfaces to ensure consistent behavior across distributions maintained by organizations like Red Hat and Canonical.
udisks2 defers authorization decisions to policy systems like Polkit and session managers like systemd's logind. By design, operations that affect system-wide state—such as partition table writes or formatting—require elevated privileges mediated through policy rules, while user-scoped operations like mounting removable media can be allowed for active sessions. The service exposes fine-grained actions to enable administrators to craft rules for environments ranging from single-user desktops to multi-seat installations supported by distributions like Fedora (operating system). Audit trails and access control can be integrated with logging subsystems adopted by projects such as systemd-journald.
udisks2 originated as a successor to the earlier udisks project, rearchitected to provide cleaner D-Bus interfaces and improved integration with modern Linux system components. Development has taken place within the freedesktop.org community with contributions by organizations including Red Hat and independent maintainers active in open source ecosystems. Its evolution paralleled shifts toward systemd-centric management and advances in storage technologies such as NVMe and logical volume management. The project’s roadmap and issue tracking have been handled through community channels and upstream repositories maintained by contributors across distributions like Debian and Fedora (operating system).
Category:Linux software