SYSTEMD-MAKEFS@.SERVICE(8)

๐Ÿ’– SYSTEMD-MAKEFS@.SERVICE(8) ๐Ÿ’–

okay bestie, sit down, hydrate, because today we're talking about the systemd-makefs@.service family of units from the systemd-makefs@.service manual. it's giving filesystem glow-ups on demand and honestly? iconic. โœจ


๐ŸŒธ NAME ๐ŸŒธ

systemd-makefs@.service, systemd-mkswap@.service, systemd-growfs@.service, systemd-growfs-root.service, systemd-makefs, systemd-growfs โ€” Creating and growing file systems on demand ๐Ÿฆ‹


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

systemd-makefs@device.service
systemd-mkswap@device.service
systemd-growfs@mountpoint.service
systemd-growfs-root.service
/usr/lib/systemd/systemd-makefs FSTYPE DEVICE
/usr/lib/systemd/systemd-growfs MOUNTPOINT

โœจ DESCRIPTION โœจ

so like. systemd-makefs@.service, systemd-mkswap@.service, systemd-growfs@.service, and systemd-growfs-root.service are the little units that make the x-systemd.makefs and x-systemd.growfs options in fstab(5) actually happen, k? peep systemd.mount(5) for the deets. ๐Ÿ’…

they get instantiated per device โ€” like, for every device where the file system or swap structure still needs to be initialized โ€” and per mount point where the file system needs to be grown. one unit per vibe, no cap.

these services fire up at boot, either right before or right after the mount point or the swap device gets used. timing queen behavior. ๐Ÿ‘‘

systemd-makefs lowkey knows very little about specific file systems and swap devices, and it's fine with that. after it checks that the block device does not already contain a file system or other content, it goes and executes the binaries that are specific to each filesystem type โ€” that's /sbin/mkfs.type or /sbin/mkswap. for certain file system types (currently ext2/ext3/ext4(5), btrfs(5), xfs(5), f2fs, vfat) and for swap devices, it'll configure reasonable defaults and set the file system label and UUID based on the device name. it's basically doing the most so you don't have to. ๐Ÿซถ

systemd-growfs also knows very little about specific file systems and swap devices, and it will instruct the kernel to grow the mounted filesystem to full size of the underlying block device. full size, no crumbs left. but here's the thing bestie โ€” it needs to know the ioctl(2) number that's specific to each file system, so only certain types are supported. currently: ext4(5), btrfs(5), xfs(5), and dm-crypt partitions (see cryptsetup(8)). iykyk. ๐Ÿงš

โš ๏ธ important, don't skip this: if the creation of a file system or swap device fails, the mount point or swap is failed too. and if the growing of a file system fails, a warning is emitted. so pay attention to your warnings, bestie, they're not just decorative. ๐Ÿ’€

๐Ÿ’œ SEE ALSO ๐Ÿ’œ


okay that's the whole page, you ate that, go forth and make some file systems ๐ŸŒˆ๐Ÿ’–

systemd 262.1 โ€” that's the version this gorgeous little manpage came from, mwah, bye bestie! โญ๐ŸŽ€

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms