You are not logged in.

#1 2018-07-16 05:42:06

freijon
Member
From: Switzerland
Registered: 2014-04-05
Posts: 39

[SOLVED] Disk full error even though there should be free space

Hello fellow Arch'ers,

I recently made a data resue for a friend and copied data from a corrupted USB disk. I underestimated the data volume and completely filled my filesystem.
I copied the files to a directory in my 'home' directory, which is on the main ( '/' ) partition. After detecting my error, I immediately deleted about 18GB of data to free some space (I used 'rm -R').
Unfortunately, even after a reboot, all apps keep telling my that I have no disk space left to write in my home dir. I checked with 'baobab' (GNOME Disk Usage Analyzer) , which tells me that 18GB should be available. However, if I check with 'df', it shows me that my main partition in /dev/mapper/cryptroot is completely full.

Therefore I'm confused about the contradictory information the system is giving me. What did I miss? How can I free this disk space?

Last edited by freijon (2018-07-16 16:55:51)

Offline

#2 2018-07-16 05:45:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Disk full error even though there should be free space


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-07-16 06:09:21

freijon
Member
From: Switzerland
Registered: 2014-04-05
Posts: 39

Re: [SOLVED] Disk full error even though there should be free space

Thank you for the link.
As explained in my first post, I already used tools like "GNOME Disk Usage Analyzer" (aka baobab) to analyse my disk space and it tells me that I have free space available. It seems like there is free space in '/', but /dev/mapper/cryptroot is actually full and doesn't free space.

Offline

#4 2018-07-16 06:31:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Disk full error even though there should be free space

What is the difference between cryptroot and / ? Try using a proper tool, like ncdu.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-07-16 07:24:44

freijon
Member
From: Switzerland
Registered: 2014-04-05
Posts: 39

Re: [SOLVED] Disk full error even though there should be free space

It's my encrypted root partition. I have the same scenario like described here:

Offline

#6 2018-07-16 16:20:20

freijon
Member
From: Switzerland
Registered: 2014-04-05
Posts: 39

Re: [SOLVED] Disk full error even though there should be free space

Here is the output of 'df':

df -h
Filesystem             Size  Used Avail Use% Mounted on
dev                    7.8G     0  7.8G   0% /dev
run                    7.8G  892K  7.8G   1% /run
/dev/mapper/cryptroot  454G  436G     0 100% /
tmpfs                  7.8G  173M  7.6G   3% /dev/shm
tmpfs                  7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs                  7.8G   12K  7.8G   1% /tmp
/dev/sda2              508M   90M  419M  18% /boot
tmpfs                  1.6G  8.0K  1.6G   1% /run/user/1000

And here is what 'ncdu /' shows:

ncdu 1.13 ~ Use the arrow keys to navigate, press ? for help                                                    
--- / ----------------------------------------------------------------------------------------------------------
  375.2 GiB [##########] /home                                                                                  
   37.6 GiB [#         ] /var
   13.2 GiB [          ] /opt
    9.5 GiB [          ] /usr
  225.9 MiB [          ] /root
   89.6 MiB [          ] /boot
   19.1 MiB [          ] /etc
. 900.0 KiB [          ] /run
e  16.0 KiB [          ] /lost+found
   12.0 KiB [          ] /srv
   12.0 KiB [          ] /mnt
   12.0 KiB [          ] /tmp
.   0.0   B [          ] /proc
    0.0   B [          ] /sys
    0.0   B [          ] /dev
@   0.0   B [          ]  sbin
@   0.0   B [          ]  lib64
@   0.0   B [          ]  lib
@   0.0   B [          ]  bin

 Total disk usage: 435.9 GiB  Apparent size: 436.6 GiB  Items: 1237184

The disk is a 500 GB SSD so I really don't get why /dev/mapper/cryptroot shows that the disk is full

Last edited by freijon (2018-07-16 16:23:52)

Offline

#7 2018-07-16 16:48:29

emk
Member
Registered: 2010-05-11
Posts: 39

Re: [SOLVED] Disk full error even though there should be free space

I'm not familiar with the ins and outs of disk encryption. But looks like dm-crypt is reserving space for its own use. Have you freeing up even more space? IMHO Baobab, ncdu and df are all in agreement except baobab is not showing that what space you have is unavailable for use. Filesystem features take up disk space as well and encryption may require even more. So you don't get to use the full 500GB anyway. Again thats IMHO. Check your docs.

Offline

#8 2018-07-16 16:50:00

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: [SOLVED] Disk full error even though there should be free space

500 GB ≈ 465.661287 GiB

/dev/mapper/cryptroot is 454 GiB. If the filesystem is ext4 then 5% is reserved for the root user. You have obviously used more than 95% of the volume's space.

Offline

#9 2018-07-16 16:55:39

freijon
Member
From: Switzerland
Registered: 2014-04-05
Posts: 39

Re: [SOLVED] Disk full error even though there should be free space

I used

pacman -Sc

to clear the package cache which saved another 30G. Now df shows:

df -h
Filesystem             Size  Used Avail Use% Mounted on
dev                    7.8G     0  7.8G   0% /dev
run                    7.8G  904K  7.8G   1% /run
/dev/mapper/cryptroot  454G  405G   27G  94% /
tmpfs                  7.8G   67M  7.7G   1% /dev/shm
tmpfs                  7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs                  7.8G  1.9M  7.8G   1% /tmp
/dev/sda2              508M   90M  419M  18% /boot
tmpfs                  1.6G   20K  1.6G   1% /run/user/1000

...and my system is now usable. Like nl6720 said, it seems that you can't use the entire disk as some space is needed for the filesystem.
Thanks guys!

Offline

#10 2018-07-16 16:56:28

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,407
Website

Re: [SOLVED] Disk full error even though there should be free space

Mount / to somewhere else (e.g. /mnt) and re-run ncdu on that mount point. That will allow you to see everything on the partition, including anything hiding under /tmp or /boot that is normally hidden by the files stems that mount at those points.

EDIT: This probably won't help in this case, as it looks like all your storage space is accounted for.

Last edited by WorMzy (2018-07-16 16:58:03)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB