Drive Architecture for new PostgreSQL Environment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Drive Architecture for new PostgreSQL Environment

KARIN SUSANNE HILBERT

Hello,


We're in the process of building a new PostgreSQL environment on Scientific Linux release 7.6.

The new environment will have a Primary & 2 Standby servers & have asynchronous replication.  It will use repmgr to manage failover/switchover events.


In the past, we've always had separate separate physical drives for data, pg_xlog & backups.

We did this as a precaution against disk failure.  If we lose one, we would still have the other two to recover from.

Is that really necessary anymore, with having a repmgr cluster?


My Linux Admin wants to do the following instead:

What I propose is to set this up as a single drive and isolate the three directories using the Linux logical volume manager.  As a result, each directory would be on a separate filesystem.  This would provide the isolation that you require but would give me the ability to modify the sizes of the volumes should you run out of space.  Also, since this is a VM and all drives are essentially “virtual”, the performance of this different drive structure would be essentially identical to one with three separate drives.


Your thoughts would be appreciated.

Regards,

Karin Hilbert

Reply | Threaded
Open this post in threaded view
|

Re: Drive Architecture for new PostgreSQL Environment

Andreas Kretschmer-3


Am 10.06.19 um 18:35 schrieb Hilbert, Karin:
>
> We did this as a precaution against disk failure.  If we lose one, we
> would still have the other two to recover from.
>
> Is that really necessary anymore, with having a repmgr cluster?
>

Repmgr is for HA, not for Backup/Recovery.


Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com



Reply | Threaded
Open this post in threaded view
|

RE: Drive Architecture for new PostgreSQL Environment

Kevin Brannen
In reply to this post by KARIN SUSANNE HILBERT

From: Hilbert, Karin <[hidden email]>

Hello,

 

We're in the process of building a new PostgreSQL environment on Scientific Linux release 7.6.

The new environment will have a Primary & 2 Standby servers & have asynchronous replication.  It will use repmgr to manage failover/switchover events.

 

In the past, we've always had separate separate physical drives for data, pg_xlog & backups.

We did this as a precaution against disk failure.  If we lose one, we would still have the other two to recover from.

Is that really necessary anymore, with having a repmgr cluster?

 

My Linux Admin wants to do the following instead:

What I propose is to set this up as a single drive and isolate the three directories using the Linux logical volume manager.  As a result, each directory would be on a separate filesystem.  This would provide the isolation that you require but would give me the ability to modify the sizes of the volumes should you run out of space.  Also, since this is a VM and all drives are essentially “virtual”, the performance of this different drive structure would be essentially identical to one with three separate drives.

 

===

 

As with so many situations, “it depends”. 😊

 

I think the most important part you mentioned is that you’re in a VM, so it’s really up to your host server and you can do anything you like. I’d probably make 3 separate virtual disks so you can expand them as needed individually.

 

We use real/standalone hardware and create 1 large RAID6 array with LVM on top and then create partitions on top of LVM. Our tablespace is in 1 partition and the rest is in another partition, and backups are mirrored to another server.

 

I can probably come up with other ways to do things, like the tablespace on SSD while the logs & backups are on some slower but perhaps “more durable” storage (like a NAS/SAN/whatever). Our hardware can support 2-1TB M2 drives in RAID1 which makes me go “hmm, very fast access for the tablespace”. 😊 Probably can’t convince the “powers” to buy it though.

 

It really does depends on what’s important to you and what resources you have available (including budget).

 

HTH,

Kevin

This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.