I have an Azure VM running Postgres on Unix, supplied by Bitnami: PostgreSQL 9.6.2-0 (Ubuntu 14.04)
The DB works fine and I am populating it, but after some time, the DB reaches about 25GB in size and then my code (populating the DB) crashes...
psycopg2.OperationalError: could not extend file "base/16450/79079": No space left on device
HINT: Check free disk space.
I thought it would be a simple resize of my VM. Nope. The VM now has a HDD size of 400GB. Plenty of space.
I then tried my code and again, at 25GB, boom. No space.
The next thing I did was log into the VM via SSH and check the disks with df -h
:
As can be seen above, /dev/sda1
is 30GB in size, of which 29GB is used. I suspect my Postgres is using this HDD... set automatically when I used the Bitnami Azure template.
You can see the 400GB HDD that I have set via the Azure portal: /dev/sdb1
.
What can I do? I need a lot more data to go into my Postgres DB... and there is no visible way to change the size of /dev/sda1
via the portal.
Update
As requested, here is the contents of fstab before modification (default):
I changed /mnt
to /opt/bitnami/postgresql/data
(according to the path: https://stackoverflow.com/a/8237512/596841). When I updated, saved, quit and rebooted the server, it went back to the default (as seen above).