NAS Error: "no space left on device"

Network Attached Storage (NAS) devices and Linux devices use a unique directory called /tmp during a backup with Magnus Box. It is not persistent storage (uses device's RAM, capped at ~50% usage), and it will be cleared after every reboot. More information can be found on this Wikipedia article.

During the backup process, Magnus Box will create a number of different files as it de-duplicates data and saves metadata. Once the backup completes, these files will be deleted. However, if Magnus Box is unable to create these files during a backup, the job will stall and fail to complete. To remedy the "Couldn't save data chunk: Write: no more space left on device" error, the temporary directory location can be changed.

Note: This workflow will need to be repeated after every update of Magnus Box. A more permanent solution may be offered in the future.

Changing via SSH

To change the temporary directory via SSH, log in to the NAS via Windows Command Prompt or Mac's Terminal app. Then,

  • Create a new temporary folder with the following command: mkdir /var/tmp/backup-tmp
  • Navigate to /opt/<branded-backup-name>/ (replacing "<branded-backup-name>" with the name of your backup software without spaces)
  • Edit the script with either nano or vim
    • Ex.  sudo nano
  • Add the following to the top of the file after #!/bin/bashexport TMPDIR=/var/tmp/backup-tmp
    • Save the file

The top of the file should now resemble this:

export TMPDIR=/var/tmp/backup-tmp

set +eu

if test $UID -eq 0 ; then

        # Workaround for missing /root var in Synology DSM /rc.d/ scripts
        if test -z $HOME ; then

Now, restart the NAS device and initiate a manual backup to confirm the issue was resolved.

Changing via Backup Command

If SSH access is not available, a command can be added to the applicable backup to create and specify the new temporary directory. Note: this command should only be run once! After running the command, remove it from the Commands section.

Add the following command to the backup job, initiate a backup (to run the command), and then remove it from the backup job. Restart the NAS, and start a manual backup to confirm that issue was resolved.

mkdir /var/tmp/backup-tmp/ && sed 's/#!\/bin\/bash/#!\/bin\/bash\nexport TMPDIR=\/var\/tmp\/backup-tmp\//1' /opt/<branded-backup-name>/ | tee /opt/<branded-backup-name>/

Make sure to replace both instances of "<branded-backup-name>" with the name of the your branded application, excluding spaces. For Magnus Box branded partners, this would be:  "MagnusBox"  Below is an example of the command used on our development network where the branded backup name is "MagnusBoxDevOps":

Command example for Magnus Box Development Server

If there are any issues, or if you have any questions, please email [email protected].

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us