basic/linux: update kernel headers from v6.14-rc1
[systemd.io.git] / man / systemd-storagetm.service.xml
blob6172190157c9ca8bdabb40ad601b12ebef69a322
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-storagetm.service" conditional='ENABLE_STORAGETM'
7           xmlns:xi="http://www.w3.org/2001/XInclude">
9   <refentryinfo>
10     <title>systemd-storagetm.service</title>
11     <productname>systemd</productname>
12   </refentryinfo>
14   <refmeta>
15     <refentrytitle>systemd-storagetm.service</refentrytitle>
16     <manvolnum>8</manvolnum>
17   </refmeta>
19   <refnamediv>
20     <refname>systemd-storagetm.service</refname>
21     <refname>systemd-storagetm</refname>
22     <refpurpose>Exposes all local block devices as NVMe-TCP mass storage devices</refpurpose>
23   </refnamediv>
25   <refsynopsisdiv>
26     <para><filename>systemd-storagetm.service</filename></para>
28     <cmdsynopsis>
29       <command>/usr/lib/systemd/systemd-storagetm</command>
30       <arg choice="opt" rep="repeat">OPTIONS</arg>
31       <arg choice="opt"><replaceable>DEVICE</replaceable></arg>
32     </cmdsynopsis>
33   </refsynopsisdiv>
35   <refsect1>
36     <title>Description</title>
38     <para><filename>systemd-storagetm.service</filename> is a service that exposes all local block devices as
39     NVMe-TCP mass storage devices. Its primary use-case is to be invoked by the
40     <filename>storage-target-mode.target</filename> unit that can be booted into.</para>
42     <warning>
43       <para>The NVMe disks are currently exposed without authentication or encryption, in read/write
44       mode. This means network peers may read from and write to the device without any restrictions. This
45       functionality should hence only be used in a local setup.</para>
46     </warning>
48     <para>Note that to function properly networking must be configured too. The recommended mechanism to boot
49     into a storage target mode is by adding <literal>rd.systemd.unit=storage-target-mode.target
50     ip=link-local</literal> on the kernel command line. Note that <literal>ip=link-local</literal> only
51     configures link-local IP, i.e. IPv4LL and IPv6LL, which means non-routable addresses. This is done for
52     security reasons, so that only systems on the local link can access the devices. Use
53     <literal>ip=dhcp</literal> to assign routable addresses too. For further details see
54     <citerefentry><refentrytitle>systemd-network-generator.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
56     <para>Unless the <option>--all</option> switch is used expects one or more block devices or regular files to expose
57     via NVMe-TCP as argument.</para>
58   </refsect1>
60   <refsect1>
61     <title>Options</title>
63     <para>The following options are understood:</para>
65     <variablelist>
66       <varlistentry>
67         <term><option>--nqn=</option></term>
68         <listitem><para>Takes a string. If specified configures the NVMe Qualified Name to use for the
69         exposed NVMe-TCP mass storage devices. The NQN should follow the syntax described in <ulink
70         url="https://nvmexpress.org/wp-content/uploads/NVM-Express-Base-Specification-2.0c-2022.10.04-Ratified.pdf">NVM
71         Express Base Specification 2.0c</ulink>, section 4.5 "NVMe Qualified Names". Note that the NQN
72         specified here will be suffixed with a dot and the block device name before it is exposed on the
73         NVMe target. If not specified, defaults to
74         <literal>nqn.2023-10.io.systemd:storagetm.<replaceable>ID</replaceable></literal>, where ID is
75         replaced by a 128bit ID derived from
76         <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
78         <xi:include href="version-info.xml" xpointer="v255"/></listitem>
79       </varlistentry>
81       <varlistentry>
82         <term><option>--all</option></term>
83         <term><option>-a</option></term>
85         <listitem><para>If specified exposes all local block devices via NVMe-TCP, current and future
86         (i.e. it watches block devices come and go and updates the NVMe-TCP list as needed). Note that by
87         default any block devices that originate on the same block device as the block device backing the
88         current root file system are excluded. If the switch is specified twice this safety mechanism is
89         disabled.</para>
91         <xi:include href="version-info.xml" xpointer="v255"/></listitem>
92       </varlistentry>
94       <varlistentry>
95         <term><option>--list-devices</option></term>
97         <listitem><para>Show a list of candidate block devices this command may operate on. Specifically,
98         this enumerates block devices currently present, and shows their device node paths along with any of
99         their symlinks.</para>
101         <xi:include href="version-info.xml" xpointer="v257"/></listitem>
102       </varlistentry>
104       <xi:include href="standard-options.xml" xpointer="help" />
105       <xi:include href="standard-options.xml" xpointer="version" />
106     </variablelist>
107   </refsect1>
109   <refsect1>
110     <title>See Also</title>
111     <para><simplelist type="inline">
112       <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
113       <member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
114     </simplelist></para>
115   </refsect1>
117 </refentry>