当前位置:   article > 正文

解决Linux服务器编译docker 虚拟化源码后系统缓存占用较大导致编译失败_启动docker 服务占用大量缓存 导致服务异常

启动docker 服务占用大量缓存 导致服务异常

一、问题描述和现象

编译时间长了后,docker会产生一些缓存,编译源码对磁盘有要求,如果磁盘空间不够了,将出现编译失败,现象如:

  1. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : Script Version : 1.2
  2. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : Starting up builds merge..
  3. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : QSSI build path = /xxxxxxx/vendor/BP-CODE/LA.QSSI.13.0/LINUX/android
  4. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : Target build path = /xxxxxxxxx/vendor/BP-CODE/LA.VENDOR.13.2.6/LINUX/android
  5. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : Merged build path = /xxxxxxxxxxx/vendor/BP-CODE/LA.VENDOR.13.2.6/LINUX/android
  6. -------------提示了空间不足-----------------
  7. 2024-03-19 03:47:12 - build_image_standalone.py - INFO : Free Space available on /tmp = 11.395771026611328G
  8. 2024-03-19 03:47:12 - build_image_standalone.py - ERROR : Not enough free space available on /tmp, aborting, min free space required = 24G !!
  9. 2024-03-19 03:47:12 - build_image_standalone.py - ERROR : Free up /tmp manually, and/or Increase it using: sudo mount -o remount,size=24G tmpfs /tmp
  10. -------------提示了空间不足-----------------
  11. 2024-03-19 03:47:12 - build_image_standalone.py - ERROR : Or Alternatively, Use --no_tmp option while triggering build_image_standalone, to not use /tmp if it is a low RAM machine
  12. [COMMAND]:source vendor/qcom/opensource/core-utils/build/build_recoveryimage.sh
  13. start generate the recoveryimage.img
  14. Traceback (most recent call last):
  15. File "vendor/qcom/opensource/core-utils/build/recoveryplus.py", line 24, in <module>
  16. sys.exit(main())
  17. File "vendor/qcom/opensource/core-utils/build/recoveryplus.py", line 8, in main
  18. otazip = zipfile.ZipFile(sys.argv[1], 'r')
  19. File "/usr/lib/python3.8/zipfile.py", line 1251, in __init__
  20. self.fp = io.open(file, filemode)
  21. FileNotFoundError: [Errno 2] No such file or directory: 'out/dist/merged-qssi_kalama-ota.zip'
  22. cp: cannot stat 'out/dist/merged-qssi_kalama-ota.zip': No such file or directory
  23. Creating filesystem with parameters:
  24. Size: 2147483648
  25. Block size: 4096
  26. Blocks per group: 32768
  27. Inodes per group: 8192
  28. Inode size: 256
  29. Journal blocks: 8192
  30. Label:
  31. Blocks: 524288
  32. Block groups: 16
  33. Reserved block group size: 127
  34. Created filesystem with 14/131072 inodes and 17197/524288 blocks
  35. recoveryimage.img has been generated

服务器种df -h查看结果,如下图,确实还只剩8.6G,编译要求至少24G

二、处理办法

清理docker缓存:

1、du -hs /var/lib/docker  查看docker占用情况

2、docker system df  查看docker缓存占用

3、docker system prune  清除docker缓存
4、docker system prune -a  彻底清除docker缓存

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/562535
推荐阅读
相关标签
  

闽ICP备14008679号