Lost hard drive space


I’m new here and I’ve been trying to sort out an issue of disk space for a while…

I have a hard drive that I have partitioned for manjaro and windows. I also have a secondary drive that I store most of my media on mounted at /run/media/. When I run lsblk it shows me the drive and the partitions correctly

loop0    7:0    0  97.9M  1 loop /var/lib/snapd/snap/core/10583
loop1    7:1    0  90.7M  1 loop /var/lib/snapd/snap/plexmediaserver/168
sda      8:0    0 447.1G  0 disk 
├─sda1   8:1    0   549M  0 part 
├─sda2   8:2    0 295.4G  0 part /run/media/ryan/8820C49120C487A0
├─sda3   8:3    0   512M  0 part /boot/efi
└─sda4   8:4    0 150.7G  0 part /
sdb      8:16   0   1.8T  0 disk 
└─sdb1   8:17   0   1.8T  0 part /run/media/ryan/d

When I run 'sudo du -sh /' i get the drive showing up as 18GB.

sudo du -sh /
du: cannot access ‘/run/user/1000/gvfs’: Permission denied
du: cannot access ‘/proc/2179/task/18814’: No such file or directory
du: cannot access ‘/proc/2179/task/18816’: No such file or directory
du: cannot access ‘/proc/2179/task/18818’: No such file or directory
du: cannot access ‘/proc/18801/task/18801/fd/3’: No such file or directory
du: cannot access ‘/proc/18801/task/18801/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/18801/fd/4’: No such file or directory
du: cannot access ‘/proc/18801/fdinfo/4’: No such file or directory
18G /

but if unmount the extra drive and i run 'sudo mount --bind / /run/meida' and I rerun 'sudo du -sh /run/media' it shows that the the missing space.
'sudo du -sh /run/media/ryan
136G    /run/media/ryan'

I'm not exactly sure what is going on with the system and I can't figure out why the system can't find this space. I would really appreciate some help on figuring out how to get that space back.

First this sounds like this needs to be in the manjaro forums not here in manjaro arm forums.

From your post it does not look like you have a second drive but one drive (sda) with 4 partitions.

Your second partition is mounted on /run/media/ryan/8820C49120C487A0 not /run/media.


I updated my post with a more accurate information of what lsblk gives me and I moved this out of the ARM form to support. the /run/media/ryan/8820C49120C487A0 is a partition on the drive that houses Windows for dual boot.

du gives you the size of the content. It is telling you that the system is occupying 18GB, which is correct for a fresh install. df -h will give you a better perspective. lsblk shows you the size of each partition; lsblk -f will show you used space.

I was able to clear up a few GB of space last night so my numbers below are a bit different:

lsblk -f
├─sda1 ntfs System Reserved AAACB8D2ACB899F1
├─sda2 ntfs 8820C49120C487A0 103.6G 65% /run/media/ryan/8820C49120
├─sda3 vfat FAT32 BB2D-BFA6 510.7M 0% /boot/efi
└─sda4 ext4 1.0 28cb4464-e222-4a49-95ba-1c7b2447e5f3 10.4G 92% /

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda4 148G 136G 11G 93% /

So if I’m reading this correctly, my system shows it has 18GB of used space, which is consistent with a fresh installation, my partition size is 150GB per the lsblk, but lsblk -f is showing 136GB used, or 92% usage. I’m not sure where the other 118GB is being used by the system.

maybe this fact helps here:
when an ext4 filesystem is created, it is by default created with 5% of the available space reserved for the root user
which is, with today’s large disks, a lot of space inaccessible to the user
tune2fs -m 1
will reduce this to 1%
personally, I set it to 0%

The commands, if not run as root, may also report only on the space accessible to the user.
Maybe that’s where the discrepancy stems from?

The filesystem itself also takes up some (non trivial amount of) space on disk, which is then of course not available as storage.

Please post the output of du -sh /var/cache/pacman/pkg and du -sh ~. A great tool to look at where the space is being taken is qdirstat.

EDIT: also post the output of du -sh /var/log/journal

I cleaned pacman and the journal recently as I’ve been working on this issue. Current returns are below.

$du -sh /var/cache/pacman/pkg
352K /var/cache/pacman/pkg

$ du -sh ~
5.2G /home/ryan

$ du -sh /var/log/journal
57M /var/log/journal

Something else I’ve read is sometime space can get taken up underneath where a drive is mounted, but if I unmount /run/media/ryan/d all I’m left with in that folder is the Windows partition
/run/media/ryan/8820C49120C487A0. I tried to run fsck on a reboot with a /forcefsck file in the root folder. It’s removed after the reboot, but I can’t tell if it actually ran anything as it took the normal reboot time. I’ll take a look at qdirstat when I have a bit more time this evening.

I was aware of the reserved space for the system by default, and it is set at 5%, which is 7.5GB of space, so some of, but not all of the space.

I got confused and have not added up anything.
What amount do you think you are somehow missing?
the filesystem itself takes up some space
depending on with which parameters it is created
a 100 GB disk with an ext4 filesystem on it will not have 100 GB storage capacity

and then there are things like block size and inode size vs. actual file size which results in “wasted” space

I have a 150GB partition, / take’s up 18GB of space, I have 10GB of free space according to my file manager (dolphin), 7.5GB of system reserved space which leaves about 114GB of unaccounted for space. When you say that file system takes up some space, are you referring to something different than /?

I think this (what I meant) is going the wrong direction anyway, now that I tried again to make sense of all the info you posted here.

I think you are just misinterpreting the info the tools like lsblk and df and du give you.
It’s all a bit unclear and confusing - at least for me.

Boot from a live usb and preform de fsck from there.

I took a look at the system with qdirstat, and I think it’s showing me the same thing it looks like / is 140.7GB but when I actually run qdirstat on the directory it’s showing 18GB.

I also booted into a live usb to run fsck and it returned clean:

sudo fsck /dev/sda4
fsck from util-linux 2.36.1
e2fsck 1.45.6 (20-Mar-2020)
/dev/sda4: clean, 543112/9879552 files, 37071757/39512920 blocks

Everyone I really appreciate your help, I figured out what the issue was. I have an external server that is running samba. I backup a handful of folder to it. My guess is I tried to do the backup while I wasn’t connected to the server folders and then mounted the server folders on top of that. This is mounted in a different place than my extra internal drive.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.