References: <5BDF90CF-72E7-44A0-8C78-7854B2B8996A@gmail.com> <29ad8317-4a55-f017-6a0b-c06bf40ccab8@redhat.com> From: Zdenek Kabelac Message-ID: Date: Wed, 6 Nov 2019 10:22:25 +0100 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] exposing snapshot block device Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="iso-8859-1"; format="flowed" To: =?UTF-8?Q?Tomas_Dalebj=c3=b6rk?= Cc: LVM general discussion and development Dne 05. 11. 19 v 21:56 Tomas Dalebj=C3=B6rk napsal(a): > Thanks, >=20 > That really helped me to understand how the snapshot works. > Last question: > - lets say that block 100 which is 1MB in size is in the cow device, and = a=20 > write happen that wants to something or all data on that region of block = 100. > Than I assume; based on what have been previously said here, that the blo= ck in=20 > the cow device will be overwritten with the new changes. Yes - it needs to be written to 'COW' device - since when the block will be= =20 merged - it would overwrite whatever would have been written in 'origin' (as said - there is nothing else in snapshot metadata then 'from->to' bloc= k=20 mapping table - so there is no way to store information about a portion of = 'chunk' being already written into origin) - and 'merge' needs to work=20 reliable in cases like 'power-off' in the middle of merge operation... Regards Zdenek