Get rid of the « min-free-space-percent '3%' would be exceeded » error in rpm-ostree

While trying to rpm-ostree update I ran into this error:

error: While pulling fedora/35/x86_64/silverblue: Writing content object: min-free-space-percent ‘3%’ would be exceeded, at least 4.1 kB requested

In my case the 3 % of my filesystem would be more than the 7 GB I had available.
This is how I changed the default setting to something sensible:

sudo nano /ostree/repo/config

I used one of the options found here – add them inside the [core] section with your custom value, eg.:

min-free-space-size=123GB
or
min-free-space-percent=1

and probably
rpm-ostree reload

I would humbly suggest the Silverblue team to change the default setting to something like min-free-space-size=nGB as 3% can be both too much or too little.

I am getting this same error on Fedora Silverblue 38. However, the file /ostree/repo/config does not exist for me. Does anyone know where that file is located in version 38? (And/or how to find it yourself, regardless of Fedora version?)

You should really have this file, otherwise something really weird is going on or you’re not running Silverblue.

OK, thanks for the confirmation, that triggered me to find out I made a stupid mistake: I tried to modify the file from inside a Toolbox, where it’s not available :person_facepalming:

Now I’m running into the second hurdle, probably again something dumb I’m doing: when I press Ctrl+x in Nano and then Y to save the file, I get the following error:

[ Error writing /ostree/repo/config: Read-only file system ]

How do I actually modify the config options on a running system?

Are you sure you did that as root?

I assume so; I ran sudo nano /ostree/repo/config. Nano also shows the following message at the bottom:

[ File ‘/ostree/repo/config’ is unwritable ]

Edit: the following command does appear to work, instead of modifying the file myself: sudo ostree config set core.min-free-space-size "1GB".

Oh indeed, my bad, we’ve made sysroot read only by default now so you need to use the ostree commands like you did or temporarily remount it read write.

1 Like

Hello @siosm ,
Doesn’t the -i option of sudo need to be used if you want a more “root” behaviour from it?

-i mostly matters if you want a clean interactive shell. Otherwise for running one off commands it should be fine.

Hmm, could running that command have interfered with starting Toolboxes? I have since restarted my laptop, but when I run toolbox enter <toolbox name> I get

Error: failed to start container

Then when I run podman --log-level debug start <toolbox name>, I see a bunch of output ending in

Error: unable to start container “fd82245e245e33159ad075be7ac55820e7e7cf0ef82baf7e488d50f4e0c8f053”: crun: [conmon:d]: failed to write to /proc/self/oom_score_adj: Permission denied

setrlimit RLIMIT_NPROC: Operation not permitted: OCI permission denied
DEBU[0000] Shutting down engines

This is crun: setrlimit RLIMIT_NPROC: Operation not permitted: OCI permission denied (was: toolbox not working with existing containers after upgrade to 38.20230422.1) · Issue #460 · fedora-silverblue/issue-tracker · GitHub

1 Like

To do this, we would have to create a new configuration option as the current ones can not be used for that.

If min-free-space-size is set to a non-zero value, min-free-space-percent is ignored.

This should be reported upstream to the ostree repo: GitHub - ostreedev/ostree: Operating system and container binary deployment and upgrades

I just had the exact same issue. Using ublue cosmic-kinoite (yeah, triple unofficial).

These are based on the Fedora quay images.

I already tried the command to change the min size to 1GB

The drive is not huge, but I am very sure it is not full.