Storage full on my server

storage
ubuntu

#1

Hello everyone,

I have an issue with my Quickbox server : through time my disk is getting full by itself, at the begining is was like 10Gb, and now I have my disk full at 92% (42Gb) wheras there is not any torrents downloaded left… I checked on the rtorrent and deluge folders, nothing.
So is there a way to purge the cache and temporary files ? Or maybe it’s something else

Thanks.


#2

Run sudo du -ah / | sort -h. It will give you the output sorted by file and folder size.

This should help you find the folders that take up the most space on your server.


#3

thank you, anyway to exclude a folder from the search please ? my /mnt folder is connected to an unlimited google drive full of big files


#4

Yes. Use the --exclude parameter, e.g. sudo du -ah / --exclude=/home/ | sort -h


#5

hello @KaMoS69 I keep trying your command for days and it always disconnect me before the end of the process :frowning:
And when it doesnt crash it include /mnt/ folder (even with --exclude=/mnt/)


#6

Open screen and run command in that so that if your server disconnects it will still be running for you then you can just reconnect to screen after loggin into server again.

screen -S folders

Then run your folder command. If your sesion disconnects you can log back onto server and reattach screen using…
screen -r folders


#7

nice! I foud the issue, my Sonarr is copying instead of hardlinking :frowning:
cant find how to fix that (I already turn on the hardlinking on sonarr setings)


#8

Got to settings -> media management. Make sure Advanced Settings are “Shown”.

Under the importing section, you find a flag called “Use Hardlinks instead of Copy”, toggle that to yes.


#9

Yes the setting is on, maybe it’s because I sometimes delelte the original file?
What happen whan you delelte the original file of a hardlink?


#10

In Unix all normal files are Hardlinks. Hardlinks in a Unix (and most (all?) ) filesystems are references to what’s called an inode. The inode has a reference counter, when you have one “link” to the file (which is the normal modus operandi) the counter is 1. When you create a second, third, fourth, etc link, the counter is incremented (increased ) each time by one. When you delete (rm) a link the counter is decremented ( reduced ) by one. If the link counter reaches 0 the filesystem removes the inode and marks the space as available for use.

In short, as long as you do not delete the last link the file will remain.


#11

Ok thanks for the explonation @KaMoS69 :slight_smile: