summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRichard Sent <richard@freakingpenguin.com>2024-12-14 16:18:23 -0500
committerLudovic Courtès <ludo@gnu.org>2024-12-16 00:21:05 +0100
commit6ec3c260a1951666bcf428de3f901753429fdfdb (patch)
tree7d34888947e1d4d6438ab58a292f383b06dbe126 /doc
parent4fc1ee837b9cf97f8d5c695cb7f33c7ffd4a9d1d (diff)
services: Add resize-file-system-service.
* gnu/services/admin.scm (resize-file-system-configuration): New configuration type. (resize-file-system-shepherd-service): New procedure. (resize-file-system-service-type): New variable. * doc/guix.texi (Miscallaneous Services): Document it. Change-Id: Icae2fefc9a8d936d4c3add47520258b341f689a4 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 9bf177a185..9454fa365c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -41953,6 +41953,60 @@ Mode for filter.
@c End of auto-generated fail2ban documentation.
+@cindex resize-file-system
+@subsubheading Resize File System Service
+
+This service type lets you resize a live file system during boot, which
+can be convenient if a Guix image is flashed on an SD Card (e.g. for an
+embedded device) or uploaded to a VPS. In both cases the medium the
+image will reside upon may be larger than the image you want to produce.
+
+For an embedded device booting from an SD card you may use something like:
+@lisp
+(service resize-file-system-service-type
+ (resize-file-system-configuration
+ (file-system
+ (file-system (device (file-system-label "root"))
+ (type "ext4")))))
+@end lisp
+
+@quotation Warning
+Be extra cautious to use the correct device and type. The service has
+little error handling of its own and relies on the underlying tools.
+Wrong use could end in loss of data or the corruption of the operating
+system.
+@end quotation
+
+Partitions and file systems are grown to the maximum size available.
+File systems can only grow when they are on the last partition on a
+device and have empty space available.
+
+This service supports the ext2, ext3, ext4, btrfs, and bcachefs file
+systems.
+
+@table @asis
+
+@item @code{file-system} (default: @code{#f}) (type: file-system)
+The file-system object to resize (@pxref{File Systems}). This object
+must have the @code{device} and @code{type} fields set. Other fields
+are ignored.
+
+@item @code{cloud-utils} (default: @code{cloud-utils}) (type: file-like)
+The cloud-utils package to use. This package is used for the
+@code{growpart} command.
+
+@item @code{e2fsprogs} (default: @code{e2fsprogs}) (type: file-like)
+The e2fsprogs package to use, used for resizing ext2, ext3, and ext4
+file systems.
+
+@item @code{btrfs-progs} (default: @code{btrfs-progs}) (type: file-like)
+The btrfs-progs package to use, used for resizing the btrfs file system.
+
+@item @code{bcachefs-tools} (default: @code{bcachefs-tools}) (type: file-like)
+The bcachefs-tools package to use, used for resizing the bcachefs file system.
+
+@end table
+
@cindex Backup
@subsubheading Backup Services