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
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
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
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
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.
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.
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.
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 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 /?
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.