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 ๐
systemd(1)systemd.mount(5)systemd-fstab-generator(8)systemd-repart(8)mkfs.btrfs(8)mkfs.cramfs(8)mkfs.ext4(8)mkfs.fat(8)mkfs.hfsplus(8)mkfs.minix(8)mkfs.ntfs(8)mkfs.xfs(8)
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