GNU bug report logs - #52919
Hidden "disk-image-rw" files aren't deleted after use, filling $tmpdir

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Fri, 31 Dec 2021 18:19:01 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 52919 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 52919 <at> debbugs.gnu.org, Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#52919: Hidden "disk-image-rw" files aren't deleted after
 use, filling $tmpdir
Date: Wed, 12 Jan 2022 21:54:29 +0100
Hi,

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

> Here is a patch to store the rw images in the cache directory. Regarding
> the volatile flag, things are a little more complex than what I thought
> initially.
>
> The "guix system" help menu states that:
>
>       --volatile         for 'image', make the root file system volatile
>
> because for an image, it often makes sense to have the root file system
> persistent. For the 'vm' command however, it's probably the other way
> around as we would prefer not to copy the huge image files if possible.
>
> I feel like creating a '--volatile-image' and a '--persistent-vm' option
> is going to make things too much complex.
>
> WDYT?

Hmm.  Can we keep “image” persistent by default, and make ‘vm’ volatile
by default?  That way, ‘--volatile’ would only make sense for ‘image’,
and ‘--persistent’ would only make sense for ‘vm’.  (So we’d be adding
just one option: ‘--persistent’.)

WDYT?

> From e4efaf2ffc6d7c699f9d1c41744cfff89be65c12 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <othacehe <at> gnu.org>
> Date: Tue, 11 Jan 2022 13:27:35 +0100
> Subject: [PATCH 1/1] system: vm: Do not store rw image in the /tmp directory.
>
> * gnu/system/vm.scm (system-qemu-image/shared-store-script): Store them in the
> cache directory instead.

Leo had a point on the size of those files, and the fact that if they’re
in ~/.cache they’re not going to be removed automatically, which could
lead to user disks filling up.

So after all, it might be best to keep those images in ${TMPDIR:-/tmp}.

I would still ensure they have a name like “guix-image-$USER-XXX”, where
XXX is the store file basename.

Thoughts?

Apologies for the hesitations!

Ludo’.




This bug report was last modified 3 years and 132 days ago.

Previous Next


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