Re: LVM snapshots

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matt Clark" <matt(at)ymogen(dot)net>
Cc: Ragnar KjÃzrstad <postgres(at)ragnark(dot)vestdata(dot)no>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Murthy Kambhampaty" <murthy(dot)kambhampaty(at)goeci(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: LVM snapshots
Date: 2003-03-17 14:59:27
Message-ID: 6139.1047913167@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Matt Clark" <matt(at)ymogen(dot)net> writes:
> The snapshot volume holds the *original* data from the frozen volume,
> using copy-on-write, so neither taking nor releasing the snapshot
> involve any copying of data.

Ah, I see: so while the freeze is on, writes to the frozen volume cost
about 3x normal (1 write -> 1 read + 2 writes), but establishing and
discontinuing the freeze cost nothing. And if you have a crash the
volume is still in the proper state. Good.

> If you run out of room on the snapshot volume because you've written
> too much data to the frozen volume then you are buggered, pure and
> simple.

No, you only have to drop the freeze; the original volume is not broken.

I would wonder though about the datastructure that LVM uses to remember
which blocks of the frozen volume have been copied (and where) on the
snapshot area. I assume this table lives in kernel memory --- what
happens if it gets large?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Matt Clark 2003-03-17 15:16:19 Re: LVM snapshots
Previous Message Robert Treat 2003-03-17 14:45:20 Re: DB archiving