Inspect Disk Space Used on a Synology NAS

This has come up a couple times for different reasons, so I want to document some procedures.

For all its sophistication and flexibility, DSM 7.1.1 on a Synology NAS does not seem to offer a comprehensive way to review disk space used.

Storage Manager

The first view of data used is in Storage Manger. Here you can see how much space is in use. The Settings allow changing the notification threshold, which may be why you’re looking at this in the first place—you got an email that space is getting low.

Synology Space 01

Synology Space 02

In this case, we’re using 5.8TB of an available 7TB (after deducting the overhead of 8TB drives). But what is in that 5.8TB?

File Station

If you right-click on a shared folder in File Station and select Properties, it will, slowly, calculate the space in use by that folder. If you only have a few shared folders, that can be a fairly quick way to see what is using disk space.

Synology Space 03

Exception If you try to check the space used by Active Backup for Business folders, you’ll get a huge number that might represent the total data backed up but has nothing to do with space consumed. For example, here we see that 29.9TB of the 7TB drive is in use:

Synology Space 04

Active Backup for Business

To get the size of data in use by Active Backup, you’ll need to open the app. On the Overview page, you’ll see the “Size after reduction,” in this case 1.7TB:

Synology Space 05

SSH Details

To see detailed and comprehensive disk usage, you can connect via SSH and use the Linux du (disk usage) command.

First go to Control Panel > Connectivity > Terminal & SNMP and Enable SSH service. (Remember to disable SSH after checking disk usage.) Use PuTTY to connect to the NAS via SSH, using an admin user and password.

To get the disk space used on Volume 1, summarized at the top folder level:

cd /volume1
sudo du –h –d 1

Here we can quickly see that SpeedVault and Veeam are consuming 2.1TB and 2.0TB respectively. Oddly, ABB_Servers, an ActiveBackup repository, is incorrect even here, showing 14TB in use:

Synology Space 06

To see more details about a specific folder, append its name, optionally changing the d (depth) parameter. Here’s the @appstore folder to a depth of 2:

sudo du –h –d 2 @appstore

Synology Space 07

Although not present on this NAS, if you’re using Hyper Backup, you may want to check disk space used by the @img_bkp_cache folder. If you omit the d parameter, you’ll get a list of all files and their sizes:

sudo du –h @img_bkp_cache

On another NAS, I had to move Hyper Backup to a larger volume because the cache had grown so large. Once I confirmed that Hyper Backup had created the cache on the larger volume, I used a recursive rm (remove) command to remove it on the small volume. Don’t do this unless you are sure you know what you are doing! You could destroy your NAS data.

sudo du –h –d 1 @img_bkp_cache
sudo rm –rf @img_bkp_cache
sudo du –h –d 1 @img_bkp_cache

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.