Handle case when PostgreSQL data_dir is a mountpoint
As mentioned in #3308 (comment 175546201), the PostgreSQL upgrade to 10 will appear to have succeeded but not have done anything if the data_dir
is a mountpoint. The user worked around the issue by doing:
gitlab-ctl stop
cp -R /var/opt/gitlab/postgresql /var/opt/gitlab/postgresql.bak
umount /var/opt/gitlab/postgresql/data
mount /dev/vdb /var/opt/gitlab/postgresql
rm -rf /var/opt/gitlab/postgresql/*
cp -R /var/opt/gitlab/postgresql.bak /var/opt/gitlab/postgresql
At the very least, we should detect that the mv
failed and provide documentation on what to do next?
/cc: @balasankarc, @ibaum