From 082e5d472b7e6d432da446e5a5dcb9c387b6eab0 Mon Sep 17 00:00:00 2001 From: Jay Pfaffman Date: Thu, 31 May 2018 21:29:09 -0500 Subject: [PATCH] FIX: disk space check tests /shared If `/shared` is not the same as `/`then the disk space test fails because it's testing the wrong partition. For example, if `/` is too small you might create a separate partition for postgres so there will be enough room to update. --- templates/postgres.template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index a970dcc..30daf5f 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -62,7 +62,7 @@ run: if [ ! "10" = "$PG_MAJOR_OLD" ]; then echo Upgrading PostgreSQL from version ${PG_MAJOR_OLD} to 10 - free_disk=$(df /var | tail -n 1 | awk '{print $4}') + free_disk=$(df /shared | tail -n 1 | awk '{print $4}') required=$(($(du -s /shared/postgres_data | awk '{print $1}') * 2)) if [ "$free_disk" -lt "$required" ]; then -- 2.25.1