]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: add docs for systemd-growfs and systemd-makefs
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Nov 2017 11:55:00 +0000 (12:55 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Nov 2017 19:46:30 +0000 (20:46 +0100)
man/rules/meson.build
man/systemd-makefs@.service.xml [new file with mode: 0644]
man/systemd.mount.xml

index f74dbf9c77475f60a3ae9e2e9c8a8d214e05503d..7385658d6a4891bde52030ef90a799371b8db396 100644 (file)
@@ -569,6 +569,13 @@ manpages = [
  ['systemd-machine-id-commit.service', '8', [], ''],
  ['systemd-machine-id-setup', '1', [], ''],
  ['systemd-machined.service', '8', ['systemd-machined'], 'ENABLE_MACHINED'],
+ ['systemd-makefs@.service',
+  '8',
+  ['systemd-growfs',
+   'systemd-growfs@.service',
+   'systemd-makefs',
+   'systemd-makeswap@.service'],
+  ''],
  ['systemd-modules-load.service', '8', ['systemd-modules-load'], 'HAVE_KMOD'],
  ['systemd-mount', '1', ['systemd-umount'], ''],
  ['systemd-networkd-wait-online.service',
diff --git a/man/systemd-makefs@.service.xml b/man/systemd-makefs@.service.xml
new file mode 100644 (file)
index 0000000..073c52f
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!--
+  SPDX-License-Identifier: LGPL-2.1+
+
+  This file is part of systemd.
+
+  Copyright 2017 Zbigniew Jędrzejewski-Szmek
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+-->
+<refentry id="systemd-makefs@.service">
+
+  <refentryinfo>
+    <title>systemd-makefs@.service</title>
+    <productname>systemd</productname>
+
+    <authorgroup>
+      <author>
+        <contrib>Developer</contrib>
+        <firstname>Zbigniew</firstname>
+        <surname>Jędrzejewski-Szmek</surname>
+        <email>zbyszek@in.waw.pl</email>
+      </author>
+    </authorgroup>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>systemd-makefs@.service</refentrytitle>
+    <manvolnum>8</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>systemd-makefs@.service</refname>
+    <refname>systemd-makeswap@.service</refname>
+    <refname>systemd-growfs@.service</refname>
+    <refname>systemd-makefs</refname>
+    <refname>systemd-growfs</refname>
+    <refpurpose>Creating and growing file systems on demand</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <para><filename>systemd-makefs@<replaceable>device</replaceable>.service</filename></para>
+    <para><filename>systemd-makeswap@<replaceable>device</replaceable>.service</filename></para>
+    <para><filename>systemd-growfs@<replaceable>mountpoint</replaceable>.service</filename></para>
+    <para><filename>/usr/lib/systemd/systemd-makefs</filename></para>
+    <para><filename>/usr/lib/systemd/systemd-growfs</filename></para>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><filename>systemd-makefs@.service</filename>,
+    <filename>systemd-makeswap@.service</filename>, and
+    <filename>systemd-growfs@.service</filename> are used to implement the
+    <option>x-systemd.makefs</option> and <option>x-systemd.growfs</option> options
+    in <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+    see <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+    They are instantiated for each device for which the file system or swap structure
+    needs to be initalized, and for each mount point where the file system needs to
+    be grown.</para>
+
+    <para>These services are started at boot, either right before or right after the
+    mount point or swap device are used.</para>
+
+    <para><filename>systemd-makefs</filename> knows very little about specific file
+    systems and swap devices, and after checking that the block device does not already
+    contain a file system or other content, it will execute binaries specific to
+    each filesystem type (<filename>/sbin/mkfs.*</filename>).</para>
+
+    <para><filename>systemd-growfs</filename> knows very little about specific file
+    systems and swap devices, and will instruct the kernel to grow the mounted
+    filesystem to full size of the underlying block device. Nevertheless, it needs
+    to know the
+    <citerefentry project='man-pages'><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+    number specific to each file system, so only certain types are supported.
+    Currently:
+    <citerefentry project='man-pages'><refentrytitle>ext4</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+    btrfs (see
+    <citerefentry project='man-pages'><refentrytitle>btrfs-man5</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
+    <!-- yes, that's what the man page is called. -->
+    and dm-crypt partitions (see
+    <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
+    </para>
+
+    <para>If the creation of a file system or swap device fails, the mount point or
+    swap is failed too. If the growing of a file system fails, a warning is emitted.
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>mkfs.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index bfe52cda0f52d3a6ac6839782a2f0da72914a5e0..663e7fa3ac6ee134a7695e1edff4e226e3713574 100644 (file)
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>x-systemd.makefs</option></term>
+
+        <listitem><para>The file system or swap structure will be intialized
+        on the device. If the device is not "empty", i.e. it contains any signature,
+        the operation will be skipped. It is hence expected that this option
+        remains set even after the device has been initalized.</para>
+
+        <para>Note that this option can only be used in
+        <filename>/etc/fstab</filename>, and will be ignored when part of the
+        <varname>Options=</varname> setting in a unit file.</para>
+
+        <para>See
+        <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+        </para>
+
+        <para><citerefentry project='man-pages'><refentrytitle>wipefs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+        may be used to remove any signatures from a block device to force
+        <option>x-systemd.makefs</option> to reinitialize the device.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>x-systemd.growfs</option></term>
+
+        <listitem><para>The file system will be grown to occupy the full block
+        device. If the file system is already at maximum size, no action will
+        be performed. It is hence expected that this option remains set even after
+        the file system has been grown. Only certain file system types are supported,
+        see
+        <citerefentry><refentrytitle>systemd-makefs@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+        for details.</para>
+
+        <para>Note that this option can only be used in
+        <filename>/etc/fstab</filename>, and will be ignored when part of the
+        <varname>Options=</varname> setting in a unit file.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>_netdev</option></term>