ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
5.45k stars 1.74k forks source link

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

Closed by-JohnChen closed 1 year ago

by-JohnChen commented 1 year ago

(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 commented 1 year ago

把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 commented 1 year ago

感谢反馈,已经更正