gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 66/189: move database to /tmp as it is mounted on the pri


From: gnunet
Subject: [taler-grid5k] 66/189: move database to /tmp as it is mounted on the primary disk in grid5000 environments
Date: Thu, 28 Apr 2022 10:47:16 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 5478e010404555392ca84e756087b78fca5c944a
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Fri Mar 11 16:02:36 2022 +0100

    move database to /tmp as it is mounted on the primary disk in grid5000 
environments
---
 experiment/scripts/database.sh | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 3fae7f8..a9d209a 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -19,11 +19,11 @@ function setup_disks() {
     yes | mkfs.ext4 -m 0 /dev/disk1 || true
     mkdir /mnt/disk || true
     mount /dev/disk1 /mnt/disk || true
-    if [ ! -L /var/lib/postgresql/${POSTGRES_VERSION}/main/pg_wal ]; then
+    if [ ! -L /tmp/postgresql/${POSTGRES_VERSION}/main/pg_wal ]; then
       rm -rf /mnt/disk/pg_wal || true
-      mv /var/lib/postgresql/${POSTGRES_VERSION}/main/pg_wal/ /mnt/disk
-      ln -s /mnt/disk/pg_wal 
/var/lib/postgresql/${POSTGRES_VERSION}/main/pg_wal
-      chown -R postgres:postgres 
/var/lib/postgresql/${POSTGRES_VERSION}/main/pg_wal
+      mv /tmp/postgresql/${POSTGRES_VERSION}/main/pg_wal/ /mnt/disk
+      ln -s /mnt/disk/pg_wal /tmp/postgresql/${POSTGRES_VERSION}/main/pg_wal
+      chown -R postgres:postgres 
/tmp/postgresql/${POSTGRES_VERSION}/main/pg_wal
     fi
   fi
 }
@@ -41,6 +41,13 @@ function setup_ram_storage() {
 
 # Setup the postgresql configuration
 function setup_config() {
+
+  # Grid5000 mounts the default disk on /tmp
+  # Move the DB there to get more storage
+  if [ -d /var/lib/postgresql ]; then
+    mv /var/lib/postgresql /tmp/
+  fi
+
   sed -i "s\<DB_URL_HERE>\postgresql:///${DB_NAME}\g" \
        /etc/taler/secrets/exchange-db.secret.conf
   
@@ -164,6 +171,9 @@ function setup_config() {
 
   # Disable sequential scans
   # enable_seqscan=off
+
+  # set our database location to /tmp
+  data_directory='/tmp/postgresql/${POSTGRES_VERSION}/main'
   " > /etc/postgresql/${POSTGRES_VERSION}/main/exchange.conf
 
   if ! grep -q "include = 'exchange.conf'" \

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]