Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
01bf2b9
sd-varlink: drop pointless bitfield
keszybz Apr 29, 2026
242fca7
sd-varlink: reduce size of varlink structs
keszybz Apr 29, 2026
d9e0883
sd-json: stop printing debug messages about extension fields
keszybz Apr 29, 2026
5948ff5
libsystemd: Clean up meson.build
daandemeyer Apr 28, 2026
087fa20
shared: add io.systemd.StorageProvider Varlink interface
poettering Apr 23, 2026
4fd0df2
storage: add systemd-storage-block@.service provider
poettering Apr 23, 2026
9825195
storage: add systemd-storage-fs@.service provider
poettering Apr 23, 2026
4002a7e
storage: add 'storagectl' command-line tool
poettering Apr 22, 2026
804bf40
test: add integration test for storagectl and storage providers
poettering Apr 29, 2026
eccfd2c
TODO: track StorageProvider follow-ups, sketch a NetworkProvider sibling
poettering Apr 23, 2026
0d71d58
sd-bus: store the strv size when extending it
mrc0mmand Apr 29, 2026
51a88ac
core: limit the number of units that can be requested over ListUnitsB…
mrc0mmand Apr 29, 2026
c3ace56
cpio: move TPM PCR info into CpioTarget
poettering Apr 29, 2026
feba5dc
boot: parse 'extra' type 1 stanza too
poettering Mar 20, 2026
d5572ac
boot: load extra files for UKIs into memory and register as initrds
poettering Mar 25, 2026
a3d0e76
boot: downgrade log level for an error we ignore
poettering Apr 29, 2026
6b1324f
man: add a brief note about type 1 extra lines
poettering Apr 29, 2026
fb0143f
shared/options: add option_parser_get_help_table_ns() helper
keszybz Apr 29, 2026
c2c9887
udevadm: convert option parsing to the new option parser
keszybz Apr 26, 2026
07fc22c
udevadm-cat: convert to OPTION macros
keszybz Apr 27, 2026
765fc41
shared/options: add OPTION_COMMON_RESOLVE_NAMES
keszybz Apr 29, 2026
bfc07f8
udev: fix stale optarg use
keszybz Apr 28, 2026
5893cf3
udev: convert udev-config.c to OPTION macros
keszybz Apr 28, 2026
ce4746f
udevadm-hwdb: convert to OPTION macros
keszybz Apr 28, 2026
5751647
udevadm-test-builtin: convert to OPTION macros
keszybz Apr 28, 2026
12e5e0e
udevadm-verify: convert to OPTION macros
keszybz Apr 28, 2026
a517a62
udevadm-test: convert to OPTION macros
keszybz Apr 28, 2026
5a2144f
udevadm-monitor: convert to OPTION macros
keszybz Apr 28, 2026
ed2b92e
udevadm-settle: convert to OPTION macros
keszybz Apr 28, 2026
a00de0b
udevadm-lock: convert to OPTION macros
keszybz Apr 28, 2026
0257def
udevadm-control: convert to OPTION macros
keszybz Apr 28, 2026
5656636
udevadm-wait: convert to OPTION macros
keszybz Apr 28, 2026
222b417
udevadm-trigger: convert to OPTION macros
keszybz Apr 28, 2026
c86ba4e
udevadm-info: convert to OPTION macros
keszybz Apr 28, 2026
408d18f
udev-builtin-blkid: convert to OPTION macros
keszybz Apr 28, 2026
6c77261
sd-bus: store the strv size when extending it (#41864)
keszybz Apr 29, 2026
a79c4fd
Small cleanups in sd-varlink and sd-json (#41861)
keszybz Apr 29, 2026
53f7c1a
sd-boot related work from #41543 (add "extra" stanza to bls type 1) (…
keszybz Apr 29, 2026
ab9acf8
shared/options: add new helper option_parser_get_arg
keszybz Apr 29, 2026
fcfd42a
udev-builtin-hwdb: convert to OPTION macros
keszybz Apr 28, 2026
13f6fed
udevadm: convert verb dispatch to VERB macros
keszybz Apr 28, 2026
e4e3ec8
volume: add an "io.systemd.StorageProvider" IPC API that is supposed …
poettering Apr 29, 2026
32a291a
sd-boot: minor tweaks as follow-up for #41863
poettering Apr 29, 2026
fd035af
update TODO
poettering Apr 29, 2026
82614a4
sd-json,user-record: store the strv size when extending it
mrc0mmand Apr 29, 2026
6181143
follow-up for recently merged PRs (#41870)
keszybz Apr 29, 2026
a234840
Convert remaining udev progs to option macros (#41856)
keszybz Apr 29, 2026
994f016
blockdev-list: fix per-element leak in block_device_array_free() (#41…
brauner Apr 29, 2026
33ac56f
man: add section about systemd-boot Type#1 sidecars
bluca Apr 29, 2026
3f2189c
binfmt-util: handle ELOOP/EACCES from automount in read-only bind mounts
sdainard-AL Apr 28, 2026
a69f0b8
repart: hide read-only block devices from candidates
poettering Apr 29, 2026
cd7acee
Improve error logging for fstat failure
MillaFleurs Apr 30, 2026
9d2f5b4
fundamental/cleanup: add CLEANUP_ELEMENTS() and DEFINE_POINTER_ARRAY_…
daandemeyer Apr 27, 2026
1c53445
dns-question: limit the number of questions per query
mrc0mmand Apr 29, 2026
7671b43
sd-json: limit the number of env variables to something reasonable
mrc0mmand Apr 29, 2026
99ce7a0
options: get rid of "on_error" parameter to FOREACH_OPTION
poettering Apr 30, 2026
1f94af5
build: add optional libucontext dependency
daandemeyer Apr 25, 2026
787c17c
Introduce support for running code in fibers
daandemeyer Nov 12, 2025
a74de23
sd-future: add fiber-aware non-blocking I/O wrappers
daandemeyer Apr 25, 2026
87557b6
sd-future: make src/basic blocking helpers fiber-aware
daandemeyer Apr 25, 2026
4b6559e
sd-event: suspend instead of blocking when sd_event_run() runs on a f…
daandemeyer Mar 23, 2026
07f26d5
sd-bus: make sd-bus fiber-aware
daandemeyer Nov 13, 2025
91aaf97
sd-varlink: make sd-varlink fiber-aware
daandemeyer Apr 14, 2026
daa0aab
qmp-client: add fiber-aware call paths
daandemeyer Apr 24, 2026
bb622b9
test-qmp-client: run mock QMP servers as fibers on the shared event loop
daandemeyer Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-musl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
libqrencode-dev
libseccomp-dev
libselinux-dev
libucontext-dev
libxkbcommon-dev
linux-pam-dev
lz4-dev
Expand Down
20 changes: 18 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ SPDX-License-Identifier: LGPL-2.1-or-later

## Features

- StorageProvider interface + storagectl
- hook-up in systemd-nspawn
- hook-up in systemd-vmspawn
- hook-up in service manager (BindVolume=)
- introduce a locking concept: right now all access to volumes is fully
shared. Let's add a basic locking concept: supporting backends can take an
additional locking flag (which has to be combined with Varlink's "more"),
in which case access would only be handed out to one client at a time, with
the lock's lifetime synced up with the Varlink connection lifetime.
- introduce a volume lifecycle concept: optionally support volumes whose
whole lifecycle is associated with the varlink connections they are tied
to: when the last varlink connection that acquired them goes away, the
volume is auto-destroyed. Would be exposed via a new flag on the Acquire
call, similar to the locking logic above.

- a small tool that can do basic btrfs raid policy mgmt. i.e. gets started as
part of the initial transaction for some btrfs raid fs, waits for some time,
then puts message on screen (plymouth, console) that some devices apparently
Expand Down Expand Up @@ -2545,8 +2560,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
- systemd-tpm2-support: add a some logic that detects if system is in DA
lockout mode, and queries the user for TPM recovery PIN then.

- systemd: add storage API via varlink, where everyone can drop a socket in a
dir, similar, do the same thing for networking
- add a networking provider API, inspired by the StorageProvider. Make networkd
a provider that exposes interfaces for adding tap, tun, veth via the api,
base this on .netdev logic somehow.

- $SYSTEMD_EXECPID that the service manager sets should
be augmented with $SYSTEMD_EXECPIDFD (and similar for
Expand Down
9 changes: 9 additions & 0 deletions man/rules/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ manpages = [
['sd_watchdog_enabled', '3', [], ''],
['shutdown', '8', [], ''],
['smbios-type-11', '7', [], ''],
['storagectl', '1', ['mount.storage'], ''],
['sysctl.d', '5', [], ''],
['sysext.conf',
'5',
Expand Down Expand Up @@ -1186,6 +1187,14 @@ manpages = [
['systemd-ssh-issue', '1', [], ''],
['systemd-ssh-proxy', '1', [], ''],
['systemd-stdio-bridge', '1', [], ''],
['systemd-storage-block@.service',
'8',
['systemd-storage-block', 'systemd-storage-block.socket'],
''],
['systemd-storage-fs@.service',
'8',
['systemd-storage-fs', 'systemd-storage-fs.socket'],
''],
['systemd-storagetm.service', '8', ['systemd-storagetm'], 'ENABLE_STORAGETM'],
['systemd-stub',
'7',
Expand Down
281 changes: 281 additions & 0 deletions man/storagectl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->

<refentry id="storagectl"
xmlns:xi="http://www.w3.org/2001/XInclude">

<refentryinfo>
<title>storagectl</title>
<productname>systemd</productname>
</refentryinfo>

<refmeta>
<refentrytitle>storagectl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>storagectl</refname>
<refname>mount.storage</refname>
<refpurpose>Enumerate and mount storage volumes provided by storage providers</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>storagectl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
<arg choice="opt" rep="repeat">NAME</arg>
</cmdsynopsis>

<cmdsynopsis>
<command>mount</command>
<arg choice="plain">-t</arg>
<arg choice="plain">storage</arg>
<arg choice="plain"><replaceable>PROVIDER</replaceable>:<replaceable>VOLUME</replaceable></arg>
<arg choice="plain"><replaceable>DIRECTORY</replaceable></arg>
</cmdsynopsis>

<cmdsynopsis>
<command>mount</command>
<arg choice="plain">-t</arg>
<arg choice="plain">storage.<replaceable>FSTYPE</replaceable></arg>
<arg choice="plain"><replaceable>PROVIDER</replaceable>:<replaceable>VOLUME</replaceable></arg>
<arg choice="plain"><replaceable>DIRECTORY</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para><command>storagectl</command> may be used to inspect storage providers and the storage
volumes they expose. A storage provider is a service implementing the
<constant>io.systemd.StorageProvider</constant> <ulink url="https://varlink.org/">Varlink</ulink>
interface, registered as an AF_UNIX socket below the well-known socket directory
<filename>/run/systemd/io.systemd.StorageProvider/</filename> (in system mode) or
<varname>$XDG_RUNTIME_DIR</varname><filename>/systemd/io.systemd.StorageProvider/</filename> (in user mode). The two
storage providers shipped with systemd are
<citerefentry><refentrytitle>systemd-storage-block@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
which exposes the system's block devices, and
<citerefentry><refentrytitle>systemd-storage-fs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
which exposes regular files and directories from a backing file system.</para>

<para>The tool also provides a <citerefentry
project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> helper
for the file system type <literal>storage</literal>, which permits mounting storage volumes to arbitrary
places. See "Use as a mount helper" below for details.</para>
</refsect1>

<refsect1>
<title>Commands</title>

<para>The following commands are understood:</para>

<variablelist>

<varlistentry>
<term><command>volumes</command> <optional><replaceable>GLOB</replaceable></optional></term>

<listitem><para>List storage volumes provided by all storage providers running on the
system (or, with <option>--user</option>, in the user runtime). The optional
<replaceable>GLOB</replaceable> argument is a shell-style pattern (see
<citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
that filters the result by volume name. The output is a table containing the providing
service, the volume name, its type (<literal>blk</literal>, <literal>reg</literal> or
<literal>dir</literal>), whether it is read-only, and — if known — its size and the number
of bytes used.</para>

<para>This is the default command if none is specified.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><command>templates</command> <optional><replaceable>GLOB</replaceable></optional></term>

<listitem><para>List volume templates supported by the running storage providers. Templates
encapsulate a configuration to use when creating volumes on-the-fly, when they are acquired. Template
support is an optional feature for providers, and only applies to providers that allow creation
of volumes on-the-fly. See the respective provider documentation for details, for example
<citerefentry><refentrytitle>systemd-storage-fs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
optional <replaceable>GLOB</replaceable> argument filters by template name. Storage providers that do
not implement template-based volume creation (such as the block-device provider) do not contribute to
this output.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><command>providers</command></term>

<listitem><para>List the storage providers known to the system. This is determined by scanning the
well-known socket directory for <constant>AF_UNIX</constant> sockets that look like
<constant>io.systemd.StorageProvider</constant> endpoints. For each provider it is also reported
whether the socket can currently be connected to.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1>
<title>Options</title>

<para>The following options are understood:</para>

<variablelist>
<varlistentry>
<term><option>--system</option></term>

<listitem><para>Operate on system-wide storage providers. Sockets are looked for in
<filename>/run/systemd/io.systemd.StorageProvider/</filename>. This is the default.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><option>--user</option></term>

<listitem><para>Operate on per-user storage providers. Sockets are looked for in
<filename>$XDG_RUNTIME_DIR/systemd/io.systemd.StorageProvider/</filename>.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<xi:include href="standard-options.xml" xpointer="json" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
</refsect1>

<refsect1>
<title>Use as a mount helper</title>

<para>The tool provides the <command>/sbin/mount.storage</command> alias, implementing the
<citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
"external helper" interface, allowing storage volumes to be mounted with the regular
<command>mount</command> command. The volume to mount is encoded as the source of the mount,
in the form
<literal><replaceable>PROVIDER</replaceable>:<replaceable>VOLUME</replaceable></literal>, where
<replaceable>PROVIDER</replaceable> is the name of a storage provider (as listed by
<command>storagectl providers</command>) and <replaceable>VOLUME</replaceable> is the volume
name. Two file system type spellings are recognized:</para>

<variablelist>
<varlistentry>
<term><literal>storage</literal></term>

<listitem><para>Acquires a directory volume and bind-mounts its directory tree onto the
target.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><literal>storage.<replaceable>FSTYPE</replaceable></literal></term>

<listitem><para>Acquires a regular file or block device volume and mounts it as a file system of type
<replaceable>FSTYPE</replaceable> (for example <literal>storage.ext4</literal>,
<literal>storage.btrfs</literal>, …).</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>
</variablelist>

<para>The standard <option>-o</option> mount options are forwarded to
<command>mount</command>. In addition, the following <literal>storage.</literal>-prefixed
options are interpreted by <command>mount.storage</command> itself and stripped from the
forwarded list:</para>

<variablelist>
<varlistentry>
<term><option>storage.create=</option><replaceable>MODE</replaceable></term>

<listitem><para>Takes one of <literal>any</literal> (open if it exists, otherwise create — the
default), <literal>open</literal> (fail if the volume does not yet exist) or <literal>new</literal>
(fail if the volume already exists).</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><option>storage.template=</option><replaceable>NAME</replaceable></term>

<listitem><para>The template to use when creating a new volume, if it is missing and the provider
supports on-the-fly creation of volumes.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>

<varlistentry>
<term><option>storage.create-size=</option><replaceable>BYTES</replaceable></term>

<listitem><para>When creating a new volume on-the-fly, the size in bytes to allocate. Accepts the
usual <literal>K</literal>/<literal>M</literal>/<literal>G</literal>/<literal>T</literal> suffixes
(base 1024). Required when creating a regular file volume.</para>

<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>Examples</title>

<example>
<title>Enumerate available storage providers, volumes and templates</title>

<programlisting>$ storagectl providers
$ storagectl volumes
$ storagectl volumes '*foo*'
$ storagectl templates</programlisting>
</example>

<example>
<title>Mount a directory volume from the file system provider</title>

<programlisting># mount -t storage fs:myvol /mnt/myvol</programlisting>

<para>If the volume <literal>myvol</literal> does not yet exist, it will be created using
the default <literal>subvolume</literal> template.</para>
</example>

<example>
<title>Create and mount an ext4 file system from a regular file.</title>

<programlisting># mount -t storage.ext4 fs:scratch /mnt/scratch -o loop</programlisting>
</example>

<example>
<title>Mount a block device volume read-only</title>

<programlisting># mount -t storage.ext4 -o ro block:/dev/disk/by-id/usb-foo /mnt/foo</programlisting>
</example>
</refsect1>

<refsect1>
<title>Exit status</title>

<para>On success, 0 is returned, a non-zero failure code otherwise.</para>
</refsect1>

<xi:include href="common-variables.xml" />

<refsect1>
<title>See Also</title>
<para><simplelist type="inline">
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemd-storage-block@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemd-storage-fs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>varlinkctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
</simplelist></para>
</refsect1>

</refentry>
Loading
Loading