summaryrefslogtreecommitdiff
path: root/man/systemd-makefs@.service.xml
blob: 89662b8ae51aa39d0c0d9dfcfa1e85c5c46d1d2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0"?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1+ -->
<refentry id="systemd-makefs@.service">

  <refentryinfo>
    <title>systemd-makefs@.service</title>
    <productname>systemd</productname>
  </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 initialized, 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>