Files
zulip/puppet/zulip_ops/files/postgresql/setup_disks.sh
Alex Vandiver 4e370cda75 postgresql: Update setup-disks to drop /mnt disabling.
Hosts do not start out with a `/mnt`; there is no need to disable it.
2020-05-30 12:14:24 -07:00

17 lines
364 B
Bash
Executable File

#!/bin/sh
LOCALDISK=/dev/nvme0n1
mkfs.xfs $LOCALDISK
echo "$LOCALDISK /srv xfs nofail,noatime 1 1" >> /etc/fstab
mount /srv
# TODO use systemctl instead of pg_ctlcluster on CentOS
pg_ctlcluster 9.5 main stop
mv /var/lib/postgresql /srv
ln -s /srv/postgresql/ /var/lib
# TODO use systemctl instead of pg_ctlcluster on CentOS
pg_ctlcluster 9.5 main start