GNU bug report logs - #74837
[PATCH 0/2] Add resize-fs service

Previous Next

Package: guix-patches;

Reported by: Richard Sent <richard <at> freakingpenguin.com>

Date: Thu, 12 Dec 2024 20:18:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#74837: closed ([PATCH 0/2] Add resize-fs service)
Date: Sun, 15 Dec 2024 23:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 16 Dec 2024 00:02:33 +0100
with message-id <875xnkh7na.fsf <at> gnu.org>
and subject line Re: [bug#74837] [PATCH v3 0/2] resize-file-system-service
has caused the debbugs.gnu.org bug report #74837,
regarding [PATCH 0/2] Add resize-fs service
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
74837: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74837
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Richard Sent <richard <at> freakingpenguin.com>
To: guix-patches <at> gnu.org
Cc: Richard Sent <richard <at> freakingpenguin.com>,
 Gabriel Wicki <gabriel <at> erlikon.ch>
Subject: [PATCH 0/2] Add resize-fs service
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



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Richard Sent <richard <at> freakingpenguin.com>
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 74837-done <at> debbugs.gnu.org
Subject: Re: [bug#74837] [PATCH v3 0/2] resize-file-system-service
Date: Mon, 16 Dec 2024 00:02:33 +0100
Hi,

Richard Sent <richard <at> freakingpenguin.com> skribis:

> What would that look like? We don't want to capture an error in
> grow-filesystem-command with an exit-status of 1, so it lives outside
> the guard, and we don't want to raise an exception if the partition
> was already resized.

Ah yes, that makes sense, sorry for misunderstanding.

> (Side note, should Shepherd consider a service perpetually starting if
> the start constructor exits without returning a value?)

A constructor must return exactly one value.  (Or it can throw an
exception, which is interpreted as failure to start.)

> V3 should have all other feedback implemented.
>
> Richard Sent (2):
>   packages: cloud-utils: Add missing growpart programs to path.
>   gnu: services: Add resize-file-system-service.

Perfect.  Applied, thanks!

Ludo’.


This bug report was last modified 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.