I had problem with storage so I deleted many files and somes files in docker folders (/var/lib/docker). Is there a way to check the installation of Docker, the link containers and volumes, ... .
            Asked
            
        
        
            Active
            
        
            Viewed 66 times
        
    2 Answers
2
            
            
        This is not the way to deal with storage. I would start from scratch to be sure everything is ok.
To properly deal with storage problems:
How to clean docker devicemapper folder properly ?
If you want to increase capacity:
        Ricardo Branco
        
- 5,740
 - 1
 - 21
 - 31
 
1
            
            
        For earlier versions with devicemapper driver, I used to do following -
- Remove untagged & dangling images using simple shell awk command.
 - Always use 
docker run --rmparameter if you don't wish to review the stopped container. This will prevent from using additional storage and caches. This is more towards efficient use of Container Life Cycle, which is true for all versions. - Make sure to use 
-vparameter to remove the Volume associated with stopped container. - Make sure to have a separate mount for /var/lib on Docker Host for more Enterprise Robustness.
 - I remember one incident, where even after deleting all volumes, I had to run 
xfs_fsrto reclaim all storage space on the /var/lib mount. - Redhat/Fedora family was affected the most, the only solid solution was to remove Docker, remove /var/lib/docker & reinstall.
 
Newer version of Docker -
All operations are combined in a wrapper docker system prune -a, which cleans Volume, Image & Container. (Caution - Will remove everything which is not associated with anything).
        Subodh Pachghare
        
- 154
 - 1
 - 8