Skip to main content
Topic: strange ext4 behavior (Read 1061 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

strange ext4 behavior

I don't think this is artix related so I am placing it here in case someone can explain it.
Throughout the years of using ext3/4 partitions I have noticed that when it gets close or higher than 90% full they act strangely.
One thing is that even when you delete files from it, or move them elsewhere, the usage doesn't go down accordingly.  I sometimes run bleachbit to see if they are trapped in some trash/recovery folder, but no.  When you umount such a volume the used space varies greately, it may even show as 100% used, even though mounted it was showing much less.  Then I enlarge the partition and the used amount becomes larger than what the partition was.  Then I check and double check, nothing missing, nothing corrupt.  It is fine afterwards, it is the size of used space that seems elastic.  When a partition is like 50-60% used it is always dead accurate/consistent to the last bit.

One partition where this is common to see it happen is where I keep cache for packages /var/cache or /var/cache/pacman/pkg  or on a partition where I keep vm with dynamic disks.  One too many images blowing up and exceeding space, makes the VM to crash sometimes unexplained. 

I have searched for answers to ext4 related material but much of it so theoretical it exceeds my fs knowledge base.  I semi understand the concept of journaling but this behavior shows ability of the file system to compress itself more to make more space than it is available, showing more free space than it can actually provide.

PS  How do I look at the usage of a partition?  df when it is mounted, gparted when it is not.  I'm not looking so much at GB/GiB but percentages, so it is not a GB/GiB difference that I am worried about.

Re: strange ext4 behavior

Reply #1
try checking inodes usage (df -ih) vs regular disk usage (df -h)
if your inotes are filled up, you might see space available but no way to add files, and vice versa
especially on caches or lots of small files, depending on how inodes were set up, you may be running out

Re: strange ext4 behavior

Reply #2
Thank you, it seems I need to do some inode reading :)
Void has a separate sig file for every pkg downloaded.  So for 100pkgs there are 200files.  I didn't know this makes a difference but in this case arch's way of incorporating the signature in the pkg seems beneficial. 

Re: strange ext4 behavior

Reply #3
The number of allowed inodes is very large. The numbers you mention will most probably not fill the quota. You can easily find out by:

Code: [Select]
$ df -i