checking capacity does not work well for /

Just check if we have around 1.25GB left.

/root (data image file) is 26G
/home (our code) is 1G
/apps.swap is 2G
/backup.swap is 1G
/var is 6.2G (docker)

Rest of the system is 1.5G

Fixes #577
This commit is contained in:
girish@cloudron.io
2016-01-25 15:56:46 -08:00
parent 77d652fc2b
commit 436fc2ba13

View File

@@ -766,7 +766,7 @@ function checkDiskSpace(callback) {
var oos = entries.some(function (entry) {
return (entry.mount === paths.DATA_DIR && entry.capacity >= 0.90) ||
(entry.mount === '/' && entry.capacity >= 0.95);
(entry.mount === '/' && entry.used <= (1.25 * 1024 * 1024)); // 1.5G
});
debug('Disk space checked. ok: %s', !oos);