RE:NODE

Operations11 min read

Game server disk full: what to delete

What fills a game server's disk - logs, local backups, crash dumps, map tiles, Workshop caches - how to find the biggest folders, and what is safe to delete.

0 readers

When a game server's disk fills up, the cause is almost never the world. It is the things that grow beside it without anyone watching: log files that are never deleted, the game's own local backups, crash dumps, map renderer tiles, Workshop download caches, and old worlds nobody remembers creating. Finding which one takes a minute - list the folders by size and look at the top three - and the cleanup is usually a few deletions and one setting changed so it does not happen again. The urgent part is doing it before the next save, because a game that cannot write its world can leave a zero-byte save file in place of a good one.

This post covers the symptoms, how to find what is using the space with and without a shell, the usual culprits game by game, what is safe to delete and what is not, and how to stop the disk filling again. How much disk to buy in the first place is a sizing question covered in how much storage a game server needs.

What a full disk looks like#

A full disk rarely announces itself. The game keeps running from memory and only fails when it tries to write, so the symptoms show up in strange places:

  • Saves fail. No space left on device, IOException, Failed to save or ENOSPC in the console, often repeated every autosave.
  • The world rolls back. Players log in to find progress gone since a point hours or days ago - the last save that succeeded.
  • The server will not start. Many games write a lock file or a log on startup and die if they cannot. Pterodactyl's Wings also checks the disk quota before starting a server and refuses to boot one that is over it.
  • Updates fail. SteamCMD reports errors such as state is 0x202 after update job and the server comes up on the old version or with missing files.
  • Uploads stop halfway. The file manager or SFTP client reports a failure, and a half-written file is left behind.
  • Backups fail or come out empty. A backup has to be assembled somewhere before it is shipped.

On a panel, the disk usage figure and graph beside the console show how close you are to the plan's limit. Treat 80% as the line where you clean up, not 100%.

Finding what is using the space#

The method is the same everywhere: list the top-level folders by size, go into the biggest, repeat until you find the thing that should not be that large.

With a shell - your own machine, a VDS, or a game server where you have SSH:

bash
# biggest items in the current folder, largest last$ du -sh -- * .[!.]* 2>/dev/null | sort -h | tail -15# the 20 largest files anywhere below here$ find . -type f -printf '%s\t%p\n' | sort -n | tail -20 | numfmt --field=1 --to=iec# everything over 500 MB$ find . -type f -size +500M -exec ls -lh {} +# how much is used and free on the volume$ df -h .

The .[!.]* catches hidden folders, which is where some of the worst offenders live: .steam, .cache, .local/share. Forgetting them is how people conclude that the disk is full of nothing.

Without a shell, which is the normal situation on a game panel, the file manager or an SFTP client does the same job more slowly. WinSCP and FileZilla can show folder sizes, and WinSCP's "Calculate" on a folder sums it. Work down from the root: the server folder, then the save folder, then whichever subfolder is largest. SFTP and the file manager covers connecting.

The usual culprits#

In rough order of how often they turn out to be the answer:

CulpritWhereHow big it gets
Old log fileslogs/, profile folders, Saved/Logs/Hundreds of MB to tens of GB
The game's own local backupsBeside the worldA full world copy each, times the count
Crash dumpsRoot, Saved/Crashes/, profile folders100 MB to several GB each
Map renderer tilesplugins/dynmap/web/tiles/, bluemap/web/maps/Often larger than the world
Workshop and download cachessteamapps/workshop/, .steam/, .cache/Several GB on modded servers
Abandoned worldsExtra world folders, test savesA full world each
Pre-generated chunksMinecraft region filesGrows with the border squared
Uploaded archives never deleted.zip or .tar.gz in the rootThe size of whatever was uploaded

Logs

Logs are the first suspect because nothing deletes them by default in many games. DayZ and Arma 3 start a new .RPT on every launch and keep them all; 7 Days to Die's stock start script writes a new dated log each run; Minecraft compresses and keeps old logs indefinitely unless configured otherwise. A server that restarts nightly and logs verbosely can produce gigabytes a month. Where they live per game is in game server logs explained.

Local backups

Several games and plugins take backups into the same folder as the world. Valheim keeps -backups copies, four by default; Minecraft backup plugins write zip files into a folder inside the server; Unreal-based games often keep several save generations. Each is a full copy of the world. They are useful against a corrupt save, useless against a lost server, and a common reason a disk fills: a plugin set to keep 30 daily copies of a 5 GB world needs 150 GB.

Crash dumps

A JVM crash leaves hs_err_pid*.log (small) and, if configured, a heap dump (.hprof) the size of the heap - 8 GB of heap is an 8 GB file. Unreal games keep a folder per crash in Saved/Crashes/. Linux core dumps (core or core.<pid>) from native crashes can be as large as the process's memory. One crash loop can leave dozens of them.

Map renderers

Dynmap, BlueMap and squaremap render the world into image tiles for a web map. A large, explored world rendered at several zoom levels routinely produces more data than the world itself, and Dynmap's tile count runs into the millions on a big server. If the tiles live on disk rather than in a database, they are often the single biggest folder. Web maps with Dynmap and BlueMap covers storage options and render settings.

Workshop and Steam caches

SteamCMD downloads Workshop content into steamapps/workshop/content/<appid>/, and some games then copy it into their own mod folder - so each mod exists twice. Garry's Mod, Arma 3, DayZ, Project Zomboid and Unturned all have variations of this. Mods removed from the server's list are often not removed from the cache. SteamCMD also keeps package and download staging files in its own folder.

What is safe to delete#

The rule: delete what the game can regenerate or does not read, never what holds state, and never anything while the server is writing it.

Safe to delete (server stopped)Delete with careNever delete without a backup
Old log files, compressed logsWorkshop cache for mods still in useWorld and save folders
Crash dumps and core filesThe game's local backupsPlayer data and account databases
hs_err_pid*.log, .hprof heap dumpsMap tiles (they re-render, slowly)Config files you edited
Uploaded archives already unpackedOld worlds you think are unusedPlugin data folders
Downloads cache of mods no longer usedRegion files outside the borderBan, admin and whitelist files

"Delete with care" means it can be regenerated or replaced, but at a cost: re-downloading 10 GB of Workshop content, re-rendering a map for a day, or losing the only copy of a world someone was saving for later. Download it first if there is any doubt.

For logs, there is no reason to keep everything forever. A sensible rule is a week or two of ordinary logs and longer for admin or chat logs used in moderation. On your own server:

bash
# remove compressed Minecraft logs older than 14 days$ find logs/ -name '*.log.gz' -mtime +14 -delete# remove DayZ RPT files older than 7 days from the profiles folder$ find profiles/ -name '*.RPT' -mtime +7 -delete# remove crash dumps$ find . -name 'hs_err_pid*.log' -o -name 'core.*' | xargs -r rm -v

Run each with -print in place of -delete first, and read the list before committing to it. A find ... -delete with a typo in the path is how worlds disappear.

Stopping it filling again#

Cleaning up once buys time. These changes stop the cycle:

  • Rotate logs automatically. On a panel, a schedule cannot delete files on its own, but many games have a setting: Bohemia games can be started with fewer logs, plugins often have retention options, and for Minecraft the log4j configuration controls how many old logs are kept. On your own server, logrotate or a nightly find does it. Logs worth keeping covers what to keep and for how long.
  • Cap in-game backups. Reduce Valheim's -backups, set a retention count in any backup plugin, and rely on the panel's backups for anything beyond the last day or two. On RE:NODE, panel backups are stored off the machine rather than in the server's own folder.
  • Turn off heap dumps unless you are chasing a specific memory problem. A JVM flag such as -XX:+HeapDumpOnOutOfMemoryError is useful for one investigation and dangerous as a permanent setting on a small disk.
  • Render maps less, or into a database. Limit render zoom levels, render only within the world border, or store tiles in a database where the map plugin supports it.
  • Delete mods properly. When removing a Workshop mod, remove it from the server's mod list and from the cache folder.
  • Set a world border before pre-generating. Region files are a function of explored area. An unbounded Minecraft world that players fly across with elytra grows indefinitely; world borders and pre-generation puts a limit on it.

On RE:NODE, disk usage is graphed against the plan's limit on the console page, which makes the slow climb visible before it is urgent.

Headroom you need beyond the world#

A disk that is exactly as big as the files on it is already full, because several routine operations need temporary space:

  • Saving. Many games write the new save beside the old one and swap them, needing roughly the world's size free.
  • Updating. SteamCMD stages the changed files before applying them. A large patch needs free space comparable to the changed content.
  • Backups. Building an archive needs working space until it is shipped.
  • Uploads and unpacking. Uploading a 3 GB archive and unpacking it in place needs 3 GB plus the unpacked size until you delete the archive.

A working rule is to keep 20-30% of the disk free on a game server, and more on one that updates often or has a large world. If a server cannot stay under 70-80% after a cleanup, the plan is simply too small for the world it is running.

When the disk is full and the server is down#

If you are reading this with a server that is down and a full disk, the order that avoids making it worse:

  1. Do not start the server again yet. Another failed save can damage the world further.
  2. Check the world file sizes against the most recent backup. A save that is suddenly tiny or zero bytes is damaged.
  3. Free space with the safest deletions first: crash dumps, old logs, unpacked uploads.
  4. Take a backup of the current state, now that there is room, and lock it.
  5. Restore the world from the backup if step 2 found damage.
  6. Start the server and watch the first autosave succeed.
  7. Fix the cause from the list above so it does not refill.

If the panel's backups are the only good copy, restoring one is a button on RE:NODE; game server backup strategy covers what a backup should contain per game so that the restore is complete.

FAQ#

Why is my game server disk full when the world is small?

Because the world is rarely what fills it. Old logs, the game's local backups, crash dumps, map tiles and Workshop caches grow beside the world without limit. List folders by size and the culprit is usually obvious within a few levels.

Can a full disk corrupt my world?

Yes. If a save starts and cannot finish, the world file can be left truncated or empty. Free space before restarting, compare the world file's size with your last backup, and restore if it shrank.

Is it safe to delete log files while the server is running?

Old, rotated logs - yes. The file the server is currently writing - no, or at least not usefully, because on Linux the space is not freed until the process closes it. Stop the server first or delete only the older files.

Do panel backups use my server's disk space?

On RE:NODE, backups are stored off the machine they protect rather than in the server's own folder. Backups that a game or plugin writes into the server's folder, such as Valheim's automatic world backups, do use the server's disk.

How much free space should I keep?

Twenty to thirty per cent. Saves, updates, backups and unpacking an upload all need temporary room, and a disk that fits the files exactly will fail the first time one of those happens.


Comments

Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.

0/2000