]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-storagetm.service.xml
man: use same version in public and system ident.
[thirdparty/systemd.git] / man / systemd-storagetm.service.xml
CommitLineData
eae4943a
LP
1<?xml version="1.0"?>
2<!--*-nxml-*-->
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
eea10b26 4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
eae4943a
LP
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">
8
9 <refentryinfo>
10 <title>systemd-storagetm.service</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd-storagetm.service</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18
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>
24
25 <refsynopsisdiv>
26 <para><filename>systemd-storagetm.service</filename></para>
27
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>
34
35 <refsect1>
36 <title>Description</title>
37
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>
41
617b85d1
DT
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>
eae4943a
LP
47
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>
55
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>
59
60 <refsect1>
61 <title>Options</title>
62
63 <para>The following options are understood:</para>
64
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 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>
77
78 <xi:include href="version-info.xml" xpointer="v255"/></listitem>
79 </varlistentry>
80
81 <varlistentry>
82 <term><option>--all</option></term>
83 <term><option>-a</option></term>
84
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>
90
91 <xi:include href="version-info.xml" xpointer="v255"/></listitem>
92 </varlistentry>
93 <xi:include href="standard-options.xml" xpointer="help" />
94 <xi:include href="standard-options.xml" xpointer="version" />
95 </variablelist>
96 </refsect1>
97
98 <refsect1>
99 <title>See Also</title>
13a69c12
DT
100 <para><simplelist type="inline">
101 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
102 <member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
103 </simplelist></para>
eae4943a
LP
104 </refsect1>
105
106</refentry>