Automated Filesystem Expansion with systemd-growfs
systemd-growfs is a systemd utility that tells the kernel to grow a mounted filesystem so it fills its underlying block device. It is normally run after a partition has been resized, so the filesystem can use the new space. The utility is usually called automatically by systemd services when the x-systemd.growfs option is set in /etc/fstab. It can also be triggered by GPT partition flag 59, as defined in the Discoverable Partitions Specification.
The filesystem must already be mounted for the operation to succeed. Supported filesystems are ext4, btrfs, xfs, and dm-crypt encrypted partitions. Errors during growth produce warnings but do not fail the mount. The partition itself must be resized before the filesystem can grow into it.
Key Usage Details
| Task | Command or setting |
|---|---|
| Grow root filesystem | /usr/lib/systemd/systemd-growfs / |
| Grow filesystem at a mount point | /usr/lib/systemd/systemd-growfs /home |
| Enable automatic growth at boot | systemctl enable systemd-growfs-root.service |
| Check service status | systemctl status systemd-growfs-root.service |
| Automatic growth via fstab | Add x-systemd.growfs to the mount options |
Related Services
-
systemd-growfs@.service: template service for arbitrary mount points.
-
systemd-growfs-root.service: grows the root filesystem.
-
systemd-makefs@.service: creates filesystems on first boot.
Thinvent Products for Linux Filesystem Management
Thinvent Industrial PC IPC5, Industrial PC IPC3, Aero Mini PC, Treo Mini PC and Micro 5R Thin Client are available with Linux options. Several models run Ubuntu Linux, and the Micro 5R runs Thinux embedded Linux. The Thinvent range includes Intel Core i3-1215U, i5-1240P, i7-1255U and Core 5 120U processors, an Intel N5095A processor, and an AMD Ryzen 5 7430U processor. Storage options run from 128GB to 1TB SSD on the Intel and AMD models, and the Micro 5R has 16GB eMMC storage. Models with 1TB SSD leave the most space for later filesystem growth.
The Thinvent range does not include an option that uses a Thinvent-specific growfs tool. Growth is handled by the standard systemd-growfs utility on the Linux systems listed above.