2017-11-30 19:55:00 +08:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--*-nxml-*-->
|
2019-03-14 21:40:58 +08:00
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
2023-12-25 22:48:33 +08:00
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
2020-11-09 12:23:58 +08:00
|
|
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
2023-12-24 00:22:04 +08:00
|
|
|
<refentry id="systemd-makefs_.service">
|
2017-11-30 19:55:00 +08:00
|
|
|
|
|
|
|
<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>
|
2019-11-28 19:42:01 +08:00
|
|
|
<refname>systemd-mkswap@.service</refname>
|
2017-11-30 19:55:00 +08:00
|
|
|
<refname>systemd-growfs@.service</refname>
|
2023-03-06 06:15:29 +08:00
|
|
|
<refname>systemd-growfs-root.service</refname>
|
2017-11-30 19:55:00 +08:00
|
|
|
<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>
|
2019-11-28 19:42:01 +08:00
|
|
|
<para><filename>systemd-mkswap@<replaceable>device</replaceable>.service</filename></para>
|
2017-11-30 19:55:00 +08:00
|
|
|
<para><filename>systemd-growfs@<replaceable>mountpoint</replaceable>.service</filename></para>
|
2023-03-06 06:15:29 +08:00
|
|
|
<para><filename>systemd-growfs-root.service</filename></para>
|
2017-11-30 19:55:00 +08:00
|
|
|
<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>,
|
2023-03-06 06:15:29 +08:00
|
|
|
<filename>systemd-mkswap@.service</filename>,
|
|
|
|
<filename>systemd-growfs@.service</filename>, and
|
|
|
|
<filename>systemd-growfs-root.service</filename> are used to implement the
|
2017-11-30 19:55:00 +08:00
|
|
|
<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
|
2018-06-12 22:19:21 +08:00
|
|
|
needs to be initialized, and for each mount point where the file system needs to
|
2017-11-30 19:55:00 +08:00
|
|
|
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
|
2020-06-19 07:15:20 +08:00
|
|
|
each filesystem type (<filename>/sbin/mkfs.<replaceable>type</replaceable></filename>
|
2021-11-13 23:47:40 +08:00
|
|
|
or <filename>/sbin/mkswap</filename>). For certain file system types (currently
|
|
|
|
ext2/ext3/<citerefentry project='man-pages'><refentrytitle>ext4</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
2023-11-08 01:14:33 +08:00
|
|
|
<citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/btrfs-man5.html'>btrfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
2021-11-13 23:47:40 +08:00
|
|
|
<citerefentry project='man-pages'><refentrytitle>xfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
|
|
|
f2fs, vfat) and for swap devices, it will configure reasonable defaults and set
|
|
|
|
the file system label and UUID based on the device name.</para>
|
2017-11-30 19:55:00 +08:00
|
|
|
|
|
|
|
<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>,
|
2023-11-08 01:14:33 +08:00
|
|
|
<citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/btrfs-man5.html'>btrfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
2019-12-18 00:30:55 +08:00
|
|
|
<citerefentry project='man-pages'><refentrytitle>xfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
2017-11-30 19:55:00 +08:00
|
|
|
<!-- 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>
|
2023-12-23 02:09:32 +08:00
|
|
|
<para><simplelist type="inline">
|
|
|
|
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry><refentrytitle>systemd-repart</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html'>mkfs.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
<member><citerefentry project='man-pages'><refentrytitle>mkfs.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
|
|
|
|
</simplelist></para>
|
2017-11-30 19:55:00 +08:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|