当前位置:网站首页>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
边栏推荐
- Native JS verification code
- AI 击败了人类,设计了更好的经济机制
- Taffydb open source JS database
- [PaddleSeg源码阅读] PaddleSeg Validation 中添加 Boundary IoU的计算(1)——val.py文件细节提示
- MySQL index hit level analysis
- 保证接口数据安全的10种方案
- 三仙归洞js小游戏源码
- Face recognition attendance system based on Baidu flying plasma platform (easydl)
- Youth experience and career development
- Cf:c. factors and powers of two [DP + sort + Select Board + select several numbers equal to the minimum number of known sums]
猜你喜欢

Introduction to OTA technology of Internet of things

Click on the top of today's headline app to navigate in the middle

深入浅出【机器学习之线性回归】

< code random recording two brushes> linked list

AI 击败了人类,设计了更好的经济机制

Mui side navigation anchor positioning JS special effect
![[deep learning] 3 minutes introduction](/img/d9/acaff84dbe6bc97885b41766aa841d.png)
[deep learning] 3 minutes introduction
![Interviewer: why is the page too laggy and how to solve it? [test interview question sharing]](/img/0d/5d27c71a80e89b6bdea30672423004.png)
Interviewer: why is the page too laggy and how to solve it? [test interview question sharing]

zdog.js火箭转向动画js特效
![[OKR target management] case analysis](/img/73/d28cdf40206408be6e2ca696b8e37f.jpg)
[OKR target management] case analysis
随机推荐
Interviewer: why is the page too laggy and how to solve it? [test interview question sharing]
【深度学习】3分钟入门
Self made dataset in pytoch for dataset rewriting
Define menus using XML resource files
Mui side navigation anchor positioning JS special effect
Tips of the week 136: unordered containers
基于百度飞浆平台(EasyDL)设计的人脸识别考勤系统
线上比赛相关规则补充说明
[principle and technology of network attack and Defense] Chapter 6: Trojan horse
Explain it in simple terms. CNN convolutional neural network
Pytorch中自制数据集进行Dataset重写
数学分析_笔记_第11章:Fourier级数
Introduction to OTA technology of Internet of things
元宇宙带来的创意性改变
直播软件搭建,canvas文字加粗
[answer] if the app is in the foreground, the activity will not be recycled?
带动画的列表选中js特效
Ansible learning summary (9) -- ansible loop, condition judgment, trigger, processing failure and other task control use summary
Ansible 学习总结(9)—— Ansible 循环、条件判断、触发器、处理失败等任务控制使用总结
讨论 | AR 应用落地前,要做好哪些准备?