Subject: [PATCH 0/2] Add resize-fs service

From: Richard Sent <[email-masked]>
Date: Thu, 12 Dec 2024 15:16:33 -0500

Hi all,

This patch series adds a resize-fs service, a service designed to resize a
file system. It does this by utilizing cloud-utils growpart and an appropriate
file system utility.

This is loosely based on code from Gabriel Wicki in #69090. While it has been
substantially changed, I figured I'd preserve the copyright notice.

I opted to use a file-system object directly and resolve the device path when
the service runs instead of having the user hardcode the parent device path
and partition number ahead of time. This hopefully makes it a bit easier to
use, although the user still needs to ensure the desired partition is at the
end of any image.

I tested this with a removable flash drive and an ext4 file system. I'd
greatly appreciate additional help; it's quite a pain! I have not tried it
using a system image on a VPS.

One possible limitation is that this service only supports resizing one file
system and cannot be extended. On the other hand I'm struggling to come up
with use cases where someone would need to extend multiple file systems
simultaneously.

I expect this patch will need some feedback. :)

Richard Sent (2):
  gnu: services: Add resize-fs-service.
  packages: cloud-utils: Add missing growpart programs to path.

 doc/guix.texi          |  50 +++++++++++++++
 gnu/packages/admin.scm |  15 ++++-
 gnu/services/admin.scm | 135 ++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 196 insertions(+), 4 deletions(-)

base-commit: a9003b8e6b40b59c9545ae87bb441d3549630db7
-- 
2.46.0