There are several
*DemonData.swap* files inside
/vz/tmp directory of different size, and they can be quite huge:
[root@vz ~]# du -sh /vz/tmp/* 914M /vz/tmp/0GED89RO~DemonData.swapFile.dat~ 4.0K /vz/tmp/4SDLCJQ6~DemonData.swapFile.dat~ 48G /vz/tmp/AGGN9R9C~DemonData.swapFile.dat~ 48G /vz/tmp/EHRTKJQO~DemonData.swapFile.dat~ 4.0K /vz/tmp/HDJ10P04~DemonData.swapFile.dat~ 4.0K /vz/tmp/I4QHRLSF~DemonData.swapFile.dat~ 914M /vz/tmp/I7PALN4D~DemonData.swapFile.dat~ 4.0K /vz/tmp/IT086FP8~DemonData.swapFile.dat~
Where do these files come from and is it safe to delete them to free up the disk space?
These files are created temporarily by Acronis backup engine (
vzabackup utility) and store the file system B-tree of the container being backed up. The size may grow large, in case the container has a huge amount of files or a lot of files change dynamically during the backup operation.
Ensure that no process is currently using the file:
[root@vz ~]# lsof /vz/temp/I7PALN4D~DemonData.swapFile.dat~ [root@vz ~]#
Now it can be safely deleted.
In case the file is still being used by a
vzlpl process, it's advised to wait until this backup operation finishes gracefully and removes the file automatically.
Sometimes it is possible to locate and fix the reason why a container has a big amount of files.
Here's a real-life example:
Container 101 has a great amount of inodes:
[root@vz ~]# vzlist -o veid,diskinodes 101 CTID DQINODES 101 1415838
Find out what uses so much files inside the container. The most likely candidate is usually /var directory:
[root@vz ~]# find /vz/root/101/var | wc -l 1336615
Checking directories hierarchically, this can be narrowed down to a single directory, containing a lot of files:
In this case, the directory stores temporary Apache PHP session files, which are not getting cleaned up and keep spawning eternally. The amount is too huge for a simple
rm -rf *command, it will error out with "The argument list is too long". The methods to delete such a big amount of files can be found here: Deleting tons of files in Linux
- Once all files are deleted, the backup operation should not create any large temporary files inside
NOTE: It is highly advised to keep PVA Agent up-to-date, subscribe to PVA Builds & Releases article to keep track of the new releases.
/vz/tmp is the default directory for storing temporary Acronis files, but it can vary, depending on the version of PVA Agent.