Обсуждение: Drive Architecture for new PostgreSQL Environment
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,
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
From: Hilbert, Karin <ioh1@psu.edu>
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