Re: LVM snapshots - Mailing list pgsql-admin

From Tom Lane
Subject Re: LVM snapshots
Date
Msg-id 6139.1047913167@sss.pgh.pa.us
Whole thread Raw
In response to Re: LVM snapshots  ("Matt Clark" <matt@ymogen.net>)
Responses Re: LVM snapshots
Re: LVM snapshots
List pgsql-admin
"Matt Clark" <matt@ymogen.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

pgsql-admin by date:

Previous
From: Robert Treat
Date:
Subject: Re: DB archiving
Next
From: "Matt Clark"
Date:
Subject: Re: LVM snapshots