[Solved] Disk space usage

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
kanyakumarirock
Posts: 16
Joined: 2023-11-27 12:54
Has thanked: 4 times

[Solved] Disk space usage

#1 Post by kanyakumarirock »

my /work filesystem had reached the limit of 1000G of memory in use. I then started to delete a number of large files and got the number down to about 800G but over time, it kept increasing again at a rate of about a gigabyte per minute so now it has reached 1000G again. I have tried to track down the problem using “du -cks” but did not manage to find anything out of the ordinary.

How to diagnose this?
Last edited by kanyakumarirock on 2024-10-14 13:49, edited 2 times in total.

CwF
Global Moderator
Global Moderator
Posts: 3262
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 69 times
Been thanked: 288 times

Re: [Hardware] Memory usage

#2 Post by CwF »

First, get the terms right. You mean storage, not memory.

Code: Select all

journalctl --disk-usage
Depending on your setup, may require root.
Something is complaining, and is spamming logs.
Mottainai

mrmazda
Posts: 594
Joined: 2023-06-02 02:22
Has thanked: 15 times
Been thanked: 75 times

Re: [Hardware] Memory usage

#3 Post by mrmazda »

If your installation is older than recent, your freespace might be lower than it could be, because you've accumulated obsolete .debs in the /var/cache/ tree. An older installation may have more space used by packages in the cache than packages that are currently installed. sudo apt clean will completely purge the downloaded package cache. This is totally unrelated to log spamming, other than both waste copious amounts of space.

To aid in searching for waste, I recommend you give ncdu a try.

User avatar
NorthEast
Posts: 358
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 31 times

Re: [Hardware] Memory usage

#4 Post by NorthEast »

To see where the largest files in your home directory you could run:

Code: Select all

du -hx ~ | sort -hr | head

Dai_trying
Posts: 1196
Joined: 2016-01-07 12:25
Has thanked: 14 times
Been thanked: 34 times

Re: [Hardware] Memory usage

#5 Post by Dai_trying »

I find "ncdu" to be most helpful in these situations, you may need to install it first but it lists folders with the sizes displayed making tracing large files and/or directories much easier.

kanyakumarirock
Posts: 16
Joined: 2023-11-27 12:54
Has thanked: 4 times

Re: [Hardware] Disk space usage

#6 Post by kanyakumarirock »

Thanks everyone for the suggestions.

My main issue is : Different used disk space with du and quota.

I tried all options but could not rectify the issue. The total occupied space and summation of all subdirectories also is much less than 1000G (145G). When I try to find out my quota usage it surprisingly displays 1000G. So, still I could not find the mysterious reason of 1000G occupancy. Could you please suggest how to unfold this?

thanks
Last edited by kanyakumarirock on 2024-01-22 12:23, edited 2 times in total.

kanyakumarirock
Posts: 16
Joined: 2023-11-27 12:54
Has thanked: 4 times

Re: [Hardware] Disk space usage

#7 Post by kanyakumarirock »

Please suggest/advice ways to rectify the isse

mrmazda
Posts: 594
Joined: 2023-06-02 02:22
Has thanked: 15 times
Been thanked: 75 times

Re: [Hardware] Disk space usage

#8 Post by mrmazda »

kanyakumarirock wrote: 2024-01-23 12:18 Please suggest/advice ways to rectify the isse
We already did that, just not in detail. Start by identifying the locations of excess space consumption. Login in a vtty or gui terminal with root privileges, then cd /, then ncdu and have a look around. If ncdu is not installed, install it: apt install ncdu. If space is unavailable to uninstall it, try apt clean and try again to install it. I have zero experience with quota, so cannot help with its issues or any problems it causes.

User avatar
bbbhltz
Section Moderator
Section Moderator
Posts: 392
Joined: 2024-01-10 14:53
Has thanked: 74 times
Been thanked: 90 times

Re: [Hardware] Disk space usage

#9 Post by bbbhltz »

I think more info about your setup is required.
bbbhltz
longtime desktop Linux user; eternal newbie

User avatar
bbbhltz
Section Moderator
Section Moderator
Posts: 392
Joined: 2024-01-10 14:53
Has thanked: 74 times
Been thanked: 90 times

Re: [Hardware] Disk space usage

#10 Post by bbbhltz »

Follow up:

du apparently does not count deleted files

The most frequent cause of this behaviour according to some quick forum searches is (as @CwF said) logs

Monitoring logs with

Code: Select all

journalctl -f
or looking for errors in

Code: Select all

dmesg
is worth trying again.
bbbhltz
longtime desktop Linux user; eternal newbie

mrmazda
Posts: 594
Joined: 2023-06-02 02:22
Has thanked: 15 times
Been thanked: 75 times

Re: [Hardware] Disk space usage

#11 Post by mrmazda »

bbbhltz wrote: 2024-01-23 16:08du apparently does not count deleted files
I suppose this must refer to files moved to a DE trash container, because doing that merely hides them. It doesn't delete them. Trash must be emptied to actually get them out of the filesystem and free the space they continue to consume while in the trash.

kanyakumarirock
Posts: 16
Joined: 2023-11-27 12:54
Has thanked: 4 times

[Hardware] [Solved] Disk space usage

#12 Post by kanyakumarirock »

Done

Post Reply