I have an Amazon EC2 instance running postgres. I would like to connect another EBS volume to this that is used ONLY for postgres data. I can add the volume, but how do configure postgres so it uses the mounted ebs drive for it's data storage?
After you detach a volume, you are still charged for volume storage as long as the storage amount exceeds the limit of the AWS Free Tier. You must delete a volume to avoid incurring further charges. For more information, see Delete an Amazon EBS volume.
EBS volumes persist independently from the running life of an EC2 instance. You can attach multiple EBS volumes to a single instance. The volume and instance must be in the same Availability Zone.
EC2 EBS-backed (EBS root) instance is stopped, what happens to the data on any ephemeral store volumes? Data is automatically saved in an EBS volume. Data is unavailable until the instance is restarted. Data will be deleted and will no longer be accessible.
You would edit the postgres pgdata and point it to the directory mapped to your EBS volume, as described in the thread here -
http://www.linuxquestions.org/questions/linux-server-73/change-postgresql-data-directory-649911/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With