How can I enforce directory space limits in a OpenVPZ system?
- by George
The title says it all. I have some programs on a server (centos4-openvz) that use a directory as temp directory - but pay no attention to the size it grows.
I want to enforcee a limit, like this folder cannot exceed 300mb.
I would use quota but OpenVZ does not support loop devices to mount a file as such.
Any other solutions? (apart from scripting a periodic delete of files in the directory).
Editing the application's code to implement such a functionality is not entirely out of the question - if it can be done easily and no other ways exist.. Its written in cpp - but I don't know how to implement it.