Closed LyesSaadi closed 3 years ago
This is more a libostree issue but there's no way to transfer issues between namespaces.
Trying to understand a bit more:
TOTAL 55% 84G 153G 223G
Is this saying that actual disk usage is 55%?
Note: My partition is 249Go and gnome-disks thinks it is 96,9% full.
Hmm, it seems like fstatvfs
then isn't returning the true number of free on-disk blocks? Can you also provide the output of stat --file-system / /var/home
?
This might be impossible to address fully since there's no way to know ahead of time how compressible the data we're writing will be. But what we could probably do is detect btrfs and use whatever e.g. ioctl calls compsize
uses to accurately get free space.
This is more a libostree issue but there's no way to transfer issues between namespaces.
Yeah, sorry for that. I realized afterward that this was actually an ostree warning, and not a rpm-ostree one. Do I need to file an issue there as well ?
Trying to understand a bit more:
TOTAL 55% 84G 153G 223G
Is this saying that actual disk usage is 55%?
Compsize reports 4 values :
(84/153)*100 = 55
.55% here is just saying that my Disk Usage is 55% of what it would have been if it wasn't compressed. Great, isn't !
So, this is actually a problem since f33, but no one noticed before apparently. But the compression made even more unreliable, until I noticed myself that my disk wasn't as full as was reported by gnome-disks and that the numbers ostree was getting were wrong.
Hmm, it seems like fstatvfs then isn't returning the true number of free on-disk blocks? Can you also provide the output of stat --file-system / /var/home?
/
and /var/home
are on the same partition, but on different subvolumes.
➜ stat --file-system / /var/home
Fichier : « / »
Identif. : c661c77a1bac4f28 Longueur du nom : 255 Type : btrfs
Taille de bloc : 4096 Taille de bloc fondamentale : 4096
Blocs : total : 60705536 libre : 2159929 disponible : 2009397
Inœuds : total : 0 libre : 0
Fichier : « /var/home »
Identif. : c661c77a1bac4f29 Longueur du nom : 255 Type : btrfs
Taille de bloc : 4096 Taille de bloc fondamentale : 4096
Blocs : total : 60705536 libre : 2159929 disponible : 2009397
Inœuds : total : 0 libre : 0
fstatvfs
does indeed seem to get it wrong...
The output is in French, sorry for that... You seem to be in Toronto, so I hope you do remember your French classes :P !
This might be impossible to address fully since there's no way to know ahead of time how compressible the data we're writing will be. But what we could probably do is detect btrfs and use whatever e.g. ioctl calls compsize uses to accurately get free space.
That's also what I thought you could do. It's the only way I could think of to solve this issue permanently...
fstatvfs
does indeed seem to get it wrong...
Hmm indeed, thanks for the output. I wonder if rpm on traditional systems also hits this then (it also does a similar space check).
You can work around this for now by explicitly setting min-free-space-percent
to 0 in /ostree/repo/config
.
You can work around this for now by explicitly setting min-free-space-percent to 0 in /ostree/repo/config.
Thank you for this :D! At least there's an easy way to fix it if someone is stuck! I had already removed my local snapshots and stored them on another partition (gnome-disk is happier :P!).
I wonder if rpm on traditional systems also hits this then (it also does a similar space check).
That would be quite dangerous in that case! It's a bit late, but, if this turns out to be true, Fedora could be pushing a broken feature... I haven't found any issue on their GitHub and on the Bugzilla, but I'll send a mail to devel later on... Just to confirm...
I haven't found any issue on their GitHub and on the Bugzilla, but I'll send a mail to devel later on... Just to confirm...
Sent. Let's hope we are wrong...
It was an error on my end: compsize wasn't doing the checks recursively and wasn't taking my snapshots into consideration! And because I compressed my files after doing my snapshots, it just duplicated all my files! My filesystem was actually full!
Host system details
Expected vs actual behavior
Expected:
Steps to reproduce it
I'm on Silverblue 34. I compressed my filesystem using btrfs's transparent compression which is awesome. But, this seems to confuse rpm-ostree into thinking there is not enough space to write a commit on the disk. This is problematic because it may force the user into reinstallation since it can't even upgrade rpm-ostree through normal means if the issue is solved (in my case, I could probably clean up older deployments) (Maybe by unlocking the file system and upgrading though rpm? Even then, that may cause some issues with the rpm db?). This is quite severe since the compression is enabled by default on Silverblue 34!
Note: My partition is 249Go and gnome-disks thinks it is 96,9% full.
Would you like to work on the issue?
I am unfortunately unfamiliar with the rpm-ostree code base, though, I am familiar with Rust and some C/C++, so I could eventually help?