Re: LVM snapshots

Поиск
Список
Период
Сортировка
От Matt Clark
Тема Re: LVM snapshots
Дата
Msg-id OAEAKHEHCMLBLIDGAFELGEDIDBAA.matt@ymogen.net
обсуждение исходный текст
Ответ на Re: LVM snapshots  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LVM snapshots
Список pgsql-admin
> Ragnar =?iso-8859-15?B?S2rDuHJzdGFk?= <postgres@ragnark.vestdata.no> writes:
> > So, basicly your database will be inresponsive for the time it takes to
> > take a snapshot. The time will depend on the size of the device, the
> > size of the pysical extents (the LVM "blocks") and the raw disk
> > performance, but typically we're talking about periods shorter than a
> > second.
>
> We are?  On what size database?  Surely it takes longer than a second to
> copy a reasonable-size database.

Ah, a misconception.  The terminology is confusing.  What is stored on the 'snapshot volume' is not a copy of the
'frozenvolume', 
but only the writes to the frozen volume.  When the 'snapshot volume' is unmounted those updates then get copied back
tothe 'frozen 
volume' which is then unfrozen.  The 'snapshot volume' therefore only needs to be big enough to store as much data as
willbe 
written to (or rather as many blocks as will be altered on) the frozen volume while the snapshot is in place.

So when you take a snapshot there is no data to be copied, and when you release a snapshot some data needs to be
writtenback. 
Since the data to be copied is nice whole disk blocks and no metadata has to be altered that's a pretty fast operation.




В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LVM snapshots
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LVM snapshots