Subject: Re: bug#68561: Guix wrongfully claims there is no space left

From: Lars Rustand <[email-masked]>
Date: Fri, 19 Jan 2024 12:03:07 +0100

Christopher Baines <[email-masked]> writes:
> Check df -i, it could be that some filesystem has run out of inodes.

Thanks, this was the case. To recover a useful amount of inodes I had to
delete almost all previous generations. I first tried to delete
generations older than one month with `guix gc -d 1m`, but this had
little effect. Even doing `guix gc -d 1w` only recovered about 50%
inodes.

This lead me to question what was using so many inodes, and by running
`{ find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n; } 2>/dev/null`
I found out that papirus-icon-theme is using an insane amount of
inodes. The below output shows all the inodes created by *one* profile
generation:

   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus/48x48@2x/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus/48x48@2x/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus/48x48/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus/48x48/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus/96x96/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus-Dark/48x48@2x/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus-Dark/48x48@2x/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus-Dark/48x48/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus-Dark/48x48/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/ePapirus-Dark/96x96/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus/48x48@2x/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus/48x48@2x/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus/48x48/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus/48x48/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus/96x96/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Dark/48x48@2x/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Dark/48x48@2x/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Dark/48x48/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Dark/48x48/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Dark/96x96/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Light/48x48@2x/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Light/48x48@2x/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Light/48x48/apps
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Light/48x48/categories
   8438 /gnu/store/d8mq08hz1hkjkr4jib5wjhrbmxxqc28s-profile/share/icons/Papirus-Light/96x96/apps

This gives a total of over 210,000 inodes used per profile generation.

I have the Papirus theme installed as part of my home configuration
which is under constant change, so it is often rebuilt many times per
day. I had to use `guix gc -d 1d` to get back a reasonable amount of
inodes.

This package seems to be impossible to keep in any profile that is
regenerated often, which is a shame. I was going to use it as a part of
my "desktop experience", and I really like to have my whole user
environment contained within the home config to make everything as
reproducible and simple to install on other machines as possible. Having
it manually installed in the default profile would stop it from eating
up unnecessary inodes, but at the expense of introducing it as an
external dependency to my home config, which is suboptimal.