ukncsc / lme

Logging Made Easy
Apache License 2.0
707 stars 115 forks source link

[BUG] [!] LME Requires 90GB of space usable for log retention - exiting #160

Closed divadiow closed 1 year ago

divadiow commented 1 year ago

Describe the issue Following upgrade procedure here to update 0.5.0 to 0.5.1 https://github.com/ukncsc/lme/blob/master/docs/upgrading.md

when running command "sudo ./deploy.sh update" the scripts bombs out with "[!] LME Requires 90GB of space usable for log retention - exiting" - /dev/mapper/ubuntu--vg-ubuntu--lv has 594GB of space available

same after server reboot

To Reproduce sudo ./deploy.sh update

Expected behaviour upgrade to complete successfully.

image image

maybe something with calculating 80% of a 1.1 terabyte disk size?

#make it stripped disk size DISK_SIZE_ROUND="$(echo ${DISK_SIZE/G/} | xargs printf "%.*f\n" 0)"

damerell commented 1 year ago

It just calculates 80% of the numeric portion of df's output. 200G disc? DISC_80 is 160. 20G disc? DISC_80 is 16. 20T disc? DISC_80 is also 16. Hence it won't work with any plausible terabyte-or-more disc.

Easy enough to fudge it by replacing DISK_80="$(($DISK_SIZE_ROUND * 80 / 100))" to hardcode it to whatever value you like, which also works around #161 .

divadiow commented 1 year ago

ta. changed line to fixed value and upgrade completed ok

DISK_80="900"

duncan-ncc commented 1 year ago

Closed due to project archive