X
X

Select Your Currency

₺ Türk Lirası $ US Dollar
X
X

Select Your Currency

₺ Türk Lirası $ US Dollar

How to Safely Diagnose Disk Usage on a Linux VDS

HomepageArticlesTechnical GuidesHow to Safely Diagnose Disk Usage o...

Disk fullness on a Linux VDS can appear as an inability to create new files, failed backups, or an application being unable to write data. First determine whether the problem is actual capacity or inode exhaustion, meaning the file entries used by the filesystem. If you have administrative access and, where possible, a current backup, identify the source by making one change at a time; instead of deleting files indiscriminately, correct the relevant application’s retention policy.

Which limit should you measure first on a Linux VDS?

This process assumes a Linux VDS managed at the operating-system level and access through SSH with an administrator or sufficiently authorized user. If you can see only quota information in a shared-hosting panel, inspect filesystem details through the provider’s panel or request them from your server administrator. Before making changes, protect running application configurations and important data with an appropriate backup method.

First, read the utilization and available space of the disk filesystems:

df -h

In the output, pay particular attention to the “Use%” value for the filesystem where the application writes. If the percentage is very high but the visible file sizes are lower than expected, also check the inode limit:

df -i

If block space is full, large files or database files are likely candidates. If inode usage is full, many small cache, session, or temporary files may have accumulated. Because these two results require different corrections, do not try to increase every limit together.

Safely narrowing down the source of the disk fullness

First inspect top-level directories by size. Depending on the distribution and installation method, application data, log files, or backups may be stored in different locations; therefore, instead of assuming a fixed file path, start from the mount point that appears full in the df -h output. When locating large directories, use a disk-usage tool that only reads data, and evaluate the results by size and modification time.

If a log file has grown, inspect that application’s log rotation or retention settings instead of deleting the file manually. Rotation is the mechanism that archives old logs at defined intervals and switches to a new file. Before changing the setting, record its current value and change only one parameter affecting the retention period or file count. Use the application’s documented reload method; unexplained service restarts may interrupt related operations.

If backups are the cause, check the backup tool’s destination, retention count, and whether failed jobs are repeatedly creating the same file. If copying to a remote destination is possible, adjust the retention policy for local archives accordingly. Deleting unverified files to free disk space is not considered a safe correction because it may break the restore chain.

Controlled actions to take according to the symptom

  1. Record when the error occurred: Note the exact time of the write, upload, or backup operation. Then find new lines from the same time in the application log. A message such as “No space left on device” suggests a block-space or inode problem; if an authorization error appears, simply increasing disk capacity may not solve it.
  2. Map the filesystem: Check which mount point contains the data path of the application reporting the error. If application data is on a separate filesystem, an apparently free root filesystem can be misleading. If the correct filesystem is full, continue investigating the source; if a different filesystem is full, do not try to correct the operation in the wrong location.
  3. Identify the largest or most numerous source: Inspect directory usage for reading only. If you find a large log, backup, or database file, verify its owner and which application uses it. If you find many small files, compare this with the inode result; in that case, inspect the application’s cache and temporary-file policy rather than looking only for one large file.
  4. Make one targeted correction: If logs have grown, address the documented rotation and retention settings; if backups have accumulated, address the verified retention policy. If application data genuinely no longer fits within the capacity, consider the provider’s disk-expansion or separate-data-volume options. Record the previous value before changing anything, and do not delete files indiscriminately.
  5. Repeat the same operation: For example, run the failed upload or backup task again under the same conditions. Note the time of the new attempt and look for a new log entry from that time. If the operation completes and utilization remains at a reasonable level, the correction has been verified; if the new entry again reports a space error, do not focus only on the first directory shown—measure other mount points and inode status again.
  6. Revert if the problem continues: If the new setting disrupts application behavior, restore the previous value you recorded and verify the same operation again. If capacity is still insufficient, discuss with your administrator the options of expanding the data volume, moving data to another supported destination, or redesigning the application’s production policy instead of broadening file deletion.

How should you interpret the results?

Suppose you receive an error when starting a backup on a Linux VDS. df -h shows that the relevant filesystem is 98% full, directory inspection shows that old local archives have grown, and the error log contains a space-shortage entry from the same time. In this case, the targeted decision is to reduce the backup tool’s verified retention count or increase capacity. By contrast, if df -i shows 100% and thousands of small session files are found, you should correct the session-cleanup policy instead of removing large archives.

If the application still cannot write after space has been freed, the result shows that disk fullness is not the only cause. Look for permission, quota, or file-path information in the new error entry; do not undo the previous space correction, because these two findings may indicate different problems. Check the application’s file owner, configured data path, and, if applicable, the user quota separately. For security and data-integrity reasons, temporarily granting broad permissions is not a safe solution.

If you need to compare server resources or hosting options after the initial measurements, you may use the Turkey VDS server plans page only to review the available options. When choosing, evaluate disk capacity, growth rate, and where backups will be stored together; a larger disk alone does not correct a faulty retention policy.

The next safe step is to record the df -h and df -i results, the error time, and the name of the full filesystem before reproducing the same error. This allows you to continue distinguishing capacity, inode, permission, and application-configuration issues on the basis of evidence.


Top