当前位置:网站首页>Summary of debian10 system problems
Summary of debian10 system problems
2022-07-07 18:08:00 【An operation and maintenance young man】
Question 1 : Ordinary users can't use java -version
resolvent ;Root Granted to ordinary users JAVA jurisdiction
sudo chmod -R 755 java The installation directory
sudo chown -R [username] java The installation directory
have already been solved
Problem the disk is full
Go to / Check the file size under
du -sh *
Then look for
Finally find the problem
【 resolved 】docker overlay2 Take up a lot of disk space
Docker Clean up data volumes volumes
Processing mode 1:
In the use of docker when , There is often a lack of disk space , The usual cause of the problem is docker The system deployed in the output a lot of log content .
here , It can be cleared by manual or scheduled tasks .
in the light of /var/lib/docker/overlay2 There are lots of solutions on the Internet , Some of these misleading claims need to be migrated to the path and other operations . In fact, the occupation of disk space and overlay No problem ( its usage And the real disk usage identical ), It's just a docker Virtual file system , The real file system is the former /dev/vda1, You can see that the path refers to the root directory , So you're going to find out where the garbage is .
Usually with overlay2 There will be the following directories in the same level directory of :
Check the function of this directory online , be supposed to overlay/overlay2 Express Docker The storage driver of continues to search for information on the Internet , We can see if there are too many dead containers , Use docker ps -a Looked at the , Sure enough . So I cleaned up the useless containers , The hard disk will return to normal ……
Simple way
Read more information , Discovery available docker system prune To automatically clean up space , Refer to the following :
This command will clear all the following resources by default :
Stopped container (container)
A volume that is not used by any container (volume)
A network that is not associated with any container (network)
All suspended mirrors (image).
By default, the command will only clear the dangling image , Unused images will not be deleted .
add to -a or --all After the parameter , You can clear all unused images and dangling images at the same time .
You can add -f or --force Parameter is used to ignore relevant alarm confirmation information .
The total amount of space freed by cleanup is displayed at the end of the instruction .
(https://yq.aliyun.com/articles/272173 )
in addition , Use the following command to view docker The size of the hard disk , Such as :
docker system df
Docker Check data volume and disk usage
Docker In case of long-term use , It is often necessary to delete old containers and create new ones , In the long term ,Docker The data volume volumes Will produce a lot of zombie files , These will be robust directories that are mostly unbound containers
Docker Delete useless data volumes
Manually delete the command
Copy code
Delete all dangling Data volume ( It's useless Volume, Zombie files )
docker volume rm $(docker volume ls -qf dangling=true)
Delete all dangling Mirror image ( That is no tag Mirror image )
docker rmi $(docker images | grep “^” | awk “{
print $3}”)
Delete all closed containers
docker ps -a | grep Exit | cut -d ’ ’ -f 1 | xargs docker rm
Copy code
Delete closed containers 、 Useless data volumes and networks , as well as dangling Mirror image ( That is no tag Mirror image )
Be careful , All closed containers will be deleted , Please check whether there are containers that are closed but need to be kept
Delete closed containers 、 Useless data volumes and networks
docker system prune
Delete more thoroughly , Can be used without container Docker The images are removed
docker system prune -a
restart Docker
Commands using the above methods can effectively clean up Docker Useless files generated by operation , And there is no need to restart Docker Effective .
Docker The images are removed
docker system prune -a
restart Docker
Commands using the above methods can effectively clean up Docker Useless files generated by operation , And there is no need to restart Docker Effective .
however Docker There may be some bug( kernel 3.13 Version of Docker Diagnosis ), Lead to Docker Unable to clean up some useless directories , But restart Docker Can solve this problem
边栏推荐
- Management by objectives [14 of management]
- Taffydb open source JS database
- 做软件测试 掌握哪些技术才能算作 “ 测试高手 ”?
- [PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
- [tpm2.0 principle and Application guide] Chapter 1-3
- Afghan interim government security forces launched military operations against a hideout of the extremist organization "Islamic state"
- Deep learning - make your own dataset
- Chapter 3 business function development (user login)
- [principle and technology of network attack and Defense] Chapter 6: Trojan horse
- Functions and usage of serachview
猜你喜欢
带动画的列表选中js特效
自动化测试:Robot FrameWork框架大家都想知道的实用技巧
Ten thousand words nanny level long article -- offline installation guide for datahub of LinkedIn metadata management platform
Native JS verification code
<代码随想录二刷>链表
[tpm2.0 principle and Application guide] Chapter 5, 7 and 8
[4500 word summary] a complete set of skills that a software testing engineer needs to master
手撕Nacos源码(先撕客户端源码)
深度学习机器学习各种数据集汇总地址
Self made dataset in pytoch for dataset rewriting
随机推荐
USB通信协议深入理解
Automated testing: a practical skill that everyone wants to know about robot framework
Tips of this week 135: test the contract instead of implementation
Pro2:修改div块的颜色
<代码随想录二刷>链表
【OKR目标管理】价值分析
讨论| 坦白局,工业 AR 应用为什么难落地?
Function and usage of calendar view component
【解惑】App处于前台,Activity就不会被回收了?
Interviewer: why is the page too laggy and how to solve it? [test interview question sharing]
[deep learning] 3 minutes introduction
Create dialog style windows with popupwindow
[4500 word summary] a complete set of skills that a software testing engineer needs to master
mui侧边导航锚点定位js特效
万字保姆级长文——Linkedin元数据管理平台Datahub离线安装指南
Simple loading animation
Taffydb open source JS database
[trusted computing] Lesson 12: TPM authorization and conversation
漫画 | 宇宙第一 IDE 到底是谁?
Cartoon | who is the first ide in the universe?