3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-makefs@.service">
9 <title>systemd-makefs@.service</title>
10 <productname>systemd</productname>
14 <refentrytitle>systemd-makefs@.service</refentrytitle>
15 <manvolnum>8</manvolnum>
19 <refname>systemd-makefs@.service</refname>
20 <refname>systemd-mkswap@.service</refname>
21 <refname>systemd-growfs@.service</refname>
22 <refname>systemd-growfs-root.service</refname>
23 <refname>systemd-makefs</refname>
24 <refname>systemd-growfs</refname>
25 <refpurpose>Creating and growing file systems on demand</refpurpose>
29 <para><filename>systemd-makefs@<replaceable>device</replaceable>.service</filename></para>
30 <para><filename>systemd-mkswap@<replaceable>device</replaceable>.service</filename></para>
31 <para><filename>systemd-growfs@<replaceable>mountpoint</replaceable>.service</filename></para>
32 <para><filename>systemd-growfs-root.service</filename></para>
33 <para><filename>/usr/lib/systemd/systemd-makefs</filename></para>
34 <para><filename>/usr/lib/systemd/systemd-growfs</filename></para>
38 <title>Description</title>
40 <para><filename>systemd-makefs@.service</filename>,
41 <filename>systemd-mkswap@.service</filename>,
42 <filename>systemd-growfs@.service</filename>, and
43 <filename>systemd-growfs-root.service</filename> are used to implement the
44 <option>x-systemd.makefs</option> and <option>x-systemd.growfs</option> options
45 in <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
46 see <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
47 They are instantiated for each device for which the file system or swap structure
48 needs to be initialized, and for each mount point where the file system needs to
51 <para>These services are started at boot, either right before or right after the
52 mount point or swap device are used.</para>
54 <para><filename>systemd-makefs</filename> knows very little about specific file
55 systems and swap devices, and after checking that the block device does not already
56 contain a file system or other content, it will execute binaries specific to
57 each filesystem type (<filename>/sbin/mkfs.<replaceable>type</replaceable></filename>
58 or <filename>/sbin/mkswap</filename>). For certain file system types (currently
59 ext2/ext3/<citerefentry project='man-pages'><refentrytitle>ext4</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
60 <citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/btrfs-man5.html'>btrfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
61 <citerefentry project='man-pages'><refentrytitle>xfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
62 f2fs, vfat) and for swap devices, it will configure reasonable defaults and set
63 the file system label and UUID based on the device name.</para>
65 <para><filename>systemd-growfs</filename> knows very little about specific file
66 systems and swap devices, and will instruct the kernel to grow the mounted
67 filesystem to full size of the underlying block device. Nevertheless, it needs
69 <citerefentry project='man-pages'><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
70 number specific to each file system, so only certain types are supported.
72 <citerefentry project='man-pages'><refentrytitle>ext4</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
73 <citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/btrfs-man5.html'>btrfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
74 <citerefentry project='man-pages'><refentrytitle>xfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
75 <!-- yes, that's what the man page is called. -->
76 and dm-crypt partitions (see
77 <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>).
80 <para>If the creation of a file system or swap device fails, the mount point or
81 swap is failed too. If the growing of a file system fails, a warning is emitted.
86 <title>See Also</title>
88 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
89 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
90 <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
91 <citerefentry><refentrytitle>systemd-repart</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
92 <citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html'>mkfs.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
93 <citerefentry project='man-pages'><refentrytitle>mkfs.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
94 <citerefentry project='man-pages'><refentrytitle>mkfs.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
95 <citerefentry project='man-pages'><refentrytitle>mkfs.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
96 <citerefentry project='man-pages'><refentrytitle>mkfs.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
97 <citerefentry project='man-pages'><refentrytitle>mkfs.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
98 <citerefentry project='man-pages'><refentrytitle>mkfs.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
99 <citerefentry project='man-pages'><refentrytitle>mkfs.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>