Re: Postgres Data Encryption Using LUKS with dm-crypt ?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Condor <condor(at)stz-bg(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres Data Encryption Using LUKS with dm-crypt ?
Date: 2017-06-19 07:40:52
Message-ID: CAOR=d=0C=ZaVEssW8iFE+R7PJd=2GCeDucK7Aj7GE6B2XnLvgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 18, 2017 at 2:20 PM, Condor <condor(at)stz-bg(dot)com> wrote:
> Hello ppl,
>
> a few years ago I asked the same question but did not receive valued answers
> and we use different way to realize the project.
> Today I wanna ask did some one do it and most important for me, can some one
> share his experience ?
> What I should expect, what is good and bad things that can be happened.
>
> Im thinking the problems can be occurred if server is restarted and data is
> not synced, but for that is raid cache battery.
> Also if hard drive need to be checked for bad clusters or broken index /
> files on filesystem what will happened with data?
> Because postgresql does not support data level encryption, Im wanna realize
> with third party tools.

The one and only time I setup a server to us LUKS was for a demo
laptop so that if it was lost our code / data / db etc etc were not
accessible. In that instance we didn't test for fsync reliability
because it was an easily recreateable system.

Generally speaking PostgreSQL expects "perfect" storage that writes
when it says it writes and doesn't present bad sectors to the database
to handle but rather maps such sectors out of the way silently without
data corruption.

I think the only real test here is to build a luks system, initiate
some pgbench type runs, wait a minute, run checkpoint and then yank
out the plug. Run a dozen or so times looking for data corruption.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin Pryzby 2017-06-19 13:50:11 inheritence children with integer columns of differing width
Previous Message Andreas Kretschmer 2017-06-19 07:29:44 Re: effective_io_concurrency increasing