Re: LVM vs Tablespaces

From: Fernando Hevia <fhevia(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "Scott Neville *EXTERN*" <scott(dot)neville(at)bluestar-software(dot)co(dot)uk>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: LVM vs Tablespaces
Date: 2015-02-25 16:48:00
Message-ID: CAGYT1XQ3McFxR25L5JgJYQAZi-3DfWBZhMXQSAsH2mRqUgT9ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Feb 25, 2015 at 8:52 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
wrote:

> Scott Neville wrote:
> > I am curious what people think on this subject. In the case that you
> have a database running on
> > hardware which has two separate data volumes (lets call them data1 and
> data2), what is the "best" way
> > for PostgreSQL to use those two volumes? So sitting here I can think of
> two very simple ways of
> > allowing PostgreSQL to use those two volumes:
> >
> > 1) Tablespaces with simple partitions - This is simply create them as
> /data1 and /data2 then run
> > "create tablespace" to create an additional tablespace on the second
> data partition then move objects
> > into it.
> > 2) LVM - Use LVM to create one single partition (which encompasses both
> volumes, for the purposes of
> > this I am assuming these volumes are already redundant behind hardware
> raid), then we have the default
> > tablespace which sits on the larger LVM volume.
> >
> > So what do people think is the "best" way and why? By "best", I dont
> have any preconditions in mind,
> > some people may consider blistering performance to be the number one
> concern and others may consider
> > ease of maintenance to be the number one, either way both are valid
> interpretations of "best" and
> > there might be different answers, hence I am wondering what people think
> is best and what makes it
> > best?
>
> ...
>
> When it comes to ease of maintenance, version 2 (striping) is much better,
> because you
> don't have to manage tablespaces, which can be a pain for backup/restore.
> You also don't have to think about data placement.
>
>
I second Albe's answer. Ease of maintenance is paramount for me so using
LVM is the better choice, more so given that performance is being taken
care on the SAN by the storage team. Of course that might not be everyone's
case.

Cheers.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sergey Shchukin 2015-02-26 06:25:31 Re: [pgadmin-support] Issue with a hanging apply process on the replica db after vacuum works on primary
Previous Message ALEXANDER JOSE 2015-02-25 16:03:20 Pgpool HBA