How to reclaim space when no space is available?

  • Open
  • quality assurance status badge
Details
4 participants
  • Leo Famulari
  • Liliana Marie Prikler
  • Mark H Weaver
  • Jeffrey Walton
Owner
unassigned
Submitted by
Jeffrey Walton
Severity
normal
J
J
Jeffrey Walton wrote on 4 Jan 2022 05:12
(address . bug-guix@gnu.org)
CAH8yC8mnQMO0D8Rv-zge+JY8Cbe5a73jhYrtcQ5MW7B4qnctgQ@mail.gmail.com
Hi Everyone,

I've run out of disk space. I'm trying to run 'guix gc' but it seems
to need disk space to perform the garbage collection.

$ sudo guix gc
finding garbage collector roots...
note: can't create trash directory: creating directory
`/gnu/store/trash': No space left on device
deleting garbage...
...
error (ignored): aborting transaction: cannot rollback - no
transaction is active
guix gc: error: committing transaction: database or disk is full

Does anyone know how to delete all old packages and artifacts without
the need for some free disk space?

I don't need old stuff. I use the VM to test builds and run self tests
of some packages I am responsible for. I don't need the extra bells
and whistles.

Jeff
L
L
Liliana Marie Prikler wrote on 4 Jan 2022 07:56
20431b5808c892bcb2fa27b3091d489741b7e369.camel@ist.tugraz.at
Am Montag, dem 03.01.2022 um 23:12 -0500 schrieb Jeffrey Walton:
Toggle quote (6 lines)
> Hi Everyone,
>
> I've run out of disk space. I'm trying to run 'guix gc' but it seems
> to need disk space to perform the garbage collection.
>
> $ sudo guix gc
I don't think the manuals specify using `sudo guix gc'. Last time I
checked a normal `guix gc' does the same, as the logic is in either way
handed off to the daemon running as root already.

Toggle quote (11 lines)
> finding garbage collector roots...
> note: can't create trash directory: creating directory
> `/gnu/store/trash': No space left on device
> deleting garbage...
> ...
> error (ignored): aborting transaction: cannot rollback - no
> transaction is active guix gc: error: committing transaction:
> database or disk is full
>
> Does anyone know how to delete all old packages and artifacts without
> the need for some free disk space?
It's a known bug that you currently can't free space without having
space. (You can try searching for similar bug IDs or you can wait for
someone else to link you to them.) The "fix" would ironically be to
sacrifice even more space to Guix by avoiding store deduplication,
because then store items can easily be deleted.

You could try manually freeing up space, but as someone who already
messed with GC internals I'd heavily suggest you avoid doing that.
Unless you don't mind stuffing kittens in a blender, that is.

Toggle quote (3 lines)
> I don't need old stuff. I use the VM to test builds and run self
> tests of some packages I am responsible for. I don't need the extra
> bells and whistles.
Those extra bells and whistles are the entire point of functional
package management. You get backups and roll-backs for free. If you
think VMs or Docker containers are sufficient for testing purposes
while you happily accept Debian overwriting files in-place, that is a
position you can hold, but it is not the Nix/Guix way.

Cheers
M
M
Mark H Weaver wrote on 4 Jan 2022 11:00
Re: bug#53000: How to reclaim space when no space is available?
878rvvbz1a.fsf@netris.org
Jeffrey Walton <noloader@gmail.com> writes:
Toggle quote (3 lines)
> Does anyone know how to delete all old packages and artifacts without
> the need for some free disk space?

Are there are any nonessential files on that partition, outside of the
store, that could be temporarily moved elsewhere, or deleted? Perhaps
old logs from /var/log, e.g. old build logs from /var/log/guix/drvs?

Mark

--
Disinformation flourishes because many people care deeply about injustice
but very few check the facts. Ask me about https://stallmansupport.org.
L
L
Leo Famulari wrote on 4 Jan 2022 18:30
(name . Mark H Weaver)(address . mhw@netris.org)
YdSETB2DMigRqjNI@jasmine.lan
On Tue, Jan 04, 2022 at 05:00:38AM -0500, Mark H Weaver wrote:
Toggle quote (8 lines)
> Jeffrey Walton <noloader@gmail.com> writes:
> > Does anyone know how to delete all old packages and artifacts without
> > the need for some free disk space?
>
> Are there are any nonessential files on that partition, outside of the
> store, that could be temporarily moved elsewhere, or deleted? Perhaps
> old logs from /var/log, e.g. old build logs from /var/log/guix/drvs?

There may also be '/var/cache' and '/root/.cache', which should be safe
to delete. The latter will definitely share a partition with the store,
and the former will probably share the partition.
?