Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提示空间不足2G,但实际还有1.2T #602

Closed
by-JohnChen opened this issue Oct 2, 2022 · 2 comments
Closed

提示空间不足2G,但实际还有1.2T #602

by-JohnChen opened this issue Oct 2, 2022 · 2 comments
Labels
support This need is supported

Comments

@by-JohnChen
Copy link

(1.1) Start building Armbian [ a311d - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(2.1) Start building Armbian [ s922x - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(3.1) Start building Armbian [ s922x-n2 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(4.1) Start building Armbian [ s922x-reva - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(5.1) Start building Armbian [ s905x3 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(6.1) Start building Armbian [ s905x2 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(7.1) Start building Armbian [ s905x2-km3 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(8.1) Start building Armbian [ s912 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(9.1) Start building Armbian [ s912-m8s - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(10.1) Start building Armbian [ s905d - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(11.1) Start building Armbian [ s905d-ki - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(12.1) Start building Armbian [ s905x - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(13.1) Start building Armbian [ s905w - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(14.1) Start building Armbian [ s905 - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
(15.1) Start building Armbian [ s905l3a - 5.10.146 ]. Remaining space is less than 2G, exit this build. \n
[ INFO ] Server space usage after compilation:
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-opt ext4 2.2T 966G 1.2T 46% /opt

@by-JohnChen
Copy link
Author

by-JohnChen commented Oct 2, 2022

把726行
now_remaining_space=$(df -hT /opt/ | grep '/dev/' | awk '{print $5}' | sed 's/.$//' | awk -F "." '{print $1}')
if [[ "${now_remaining_space}" -le "2" ]]; then
改成
now_remaining_space="$(df -T ${make_path} | grep '/dev/' | awk '{print $5}')"
let now_remaining_space/=1048576
if [[ "${now_remaining_space}" -le "2" ]]; then
问题解决。
问题分析,dh -h 会默认会转换计量单位,源码中如果计量单位不是GB就无法识别
解决思路,去掉转换参数,将变量now_remaining_space(默认为千字节)除以1048576(1024*1024)就是以吉比特为单位的剩余空间

@ophub
Copy link
Owner

ophub commented Oct 3, 2022

感谢反馈,已经更正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support This need is supported
Projects
None yet
Development

No branches or pull requests

2 participants