[Linux] What are MDSS-related resources and how to perform disk cleanup?
This guide provides an overview of MDSS (MetaDefender Storage Security) resources, including paths, containers, and volumes, along with actionable recommendations for managing disk space.
By following these guidelines, you can safely clean unnecessary files while maintaining the integrity of critical MetaDefender Storage Security data.
Primary Cleanup Mechanism
The main method for managing disk space in MetaDefender Storage Security is configuring the Database Retention Policy. This policy automatically removes outdated data based on retention settings, reducing manual cleanup requirements. For more information on setting up and using the retention policy, see the Database Retention Configuration Guide.
Filesystem Paths
MetaDefender Storage Security uses several paths on the host system for its operations. Below is a breakdown of their purposes and cleanup recommendations:
/etc/mdss
- Purpose: Main installation directory containing Docker Compose files and the
mdss.sh
script.
- Purpose: Main installation directory containing Docker Compose files and the
/etc/mdss/services_logs
- Purpose: Stores MDSS container logs mounted from each running container.
- Cleanup Guidance: Log cleanup is generally unnecessary if proper logging configurations are in place. To adjust logging levels or enable extra logging features, refer to How to Enable Extra Logging in the Configuration.
/var/log/mdss
- Purpose: Contains logs generated by MDSS scripts.
- Cleanup Guidance: Can be safely cleaned if the logs are no longer needed.
/var/lib/docker
- Purpose: Houses all Docker container filesystems and volumes.
- Important Note: Avoid making direct changes to this path. Use
docker
commands for all operations to prevent accidental data loss.
Docker Containers
MDSS services run inside Docker containers. Below are the key containers and their roles:
Containers with Names Starting with
mdss_*
andmdcs_*
- Purpose: Run MDSS services.
mdcs_rabbitmq
- Purpose: Provides RabbitMQ services for communication between MDSS components.
mdss_rediscache
- Purpose: Temporary data storage using Redis.
mdcs_mongodb
- Purpose: Database container for persistent data, including settings, storage units, and processing history.
Docker Volumes
Volumes store persistent and temporary data required by MDSS. Here's an overview:
mdss_mongo_db
- Purpose: Stores the MDSS database (persistent data).
- Important Note: Do not delete this volume unless performing a clean reinstallation.
mdss_mongo_backup
- Purpose: Temporary files for backups.
- Cleanup Guidance: Can be safely removed when MDSS is not running.
mdss_rediscache
- Purpose: Temporary data storage.
- Cleanup Guidance: Can be safely removed when MDSS is not running.
Useful Commands for Disk Usage Management
When investigating disk usage issues, use the following commands:
df -h
- Displays overall disk usage in a human-readable format.
du -h <PATH>
- Checks the size of a specific path on the system.
docker system df -v
- Provides a detailed report of disk usage for Docker containers, images, and volumes.
docker system prune -a --volumes
- Removes all unused containers, networks, images, and volumes.
- Important Note: Ensure all MDSS services are running before executing this command to avoid removing critical data.
Additional Resources
- For more detailed information, refer to the Sizing Guide.
- We also recommend configuring an external database to enhance storage capacity for MDSS operations. For detailed instructions, please refer to the following article: Using an External Database.
If you have any difficulty performing disk cleanup, please follow these instructions on How To Create a Support Package, before creating a support case or chatting with our support engineer.