Highlighted
3 Argentum

Copy-on-write & Redirect-on-write

Jump to solution

Hello all,

Can someone give brief explanation about below snapshot technologies.

1. Copy-on-write

2. Redirect-on-write

Expecting answers with some real time scenarios. It would be really helpful to understand quickly.

Advance Thanks,

Sam

0 Kudos
1 Solution

Accepted Solutions
Highlighted
2 Bronze

Re: Copy-on-write & Redirect-on-write

Jump to solution

Hi Sam,

So I think you just want to know the differences between the two technologies (Copy-on-first-write and Redirect-on-Write).

Lets first go over CofW: Say you have written some data to a LUN and it occupies data blocks 1 - 5. If you make a snapshot using CofW technology the system will create some private space to hold any original data that you may change. So in this example lets say you are going to make changes to the data on blocks 1 - 3. Before the system writes the new data to those blocks it first copies the data to that private area. Once copied, then the new data will be written to data blocks 1 - 3. Please note that the data on blocks 4 and 5 are not changed so that data does not get copied to the private space. So now the system has captured the view of your data as it was when the snapshot was created. It is important to note that if you again change the data on blocks 1 -3, there is no copy on subsequent writes, only the first write. When you look at the data from the snapshot, the system uses a series of bitmaps and blockmaps to let you see the data as it was snapped. So for example, the maps will point to the original data from blocks 1 - 3 copied to the private area and will also map you to the block 4 and 5 data that has not been changed. The real issue with CofW is that IO is held up until original data is copied to the private area to be preserved.

So the RoW avoids copying the original data, thus avoiding the need to hold the write IO.Here is how it works. So you have data on blocks 1 - 5 and you make a snap. The system now allocates new space from the storage pool to hold new writes and it leaves all of the existing data within the space already consumed, in this case blocks 1 - 5. Thus when you look at the snapshot, you are simply looking at blocks 1 - 5 and the original data is preserved. When new writes are made, the system simply redirects those to the newly allocated space. RoW uses the bitmaps and blockmaps to keep track of the newly allocated space.

Thanks

John

View solution in original post

7 Replies
Highlighted
3 Zinc

Re: Copy-on-write & Redirect-on-write

Jump to solution

Hi Sam, can you provide some context to your question?

Are you preparing for an exam? Trying to troubleshoot a real world problem?

0 Kudos
Highlighted
3 Argentum

Re: Copy-on-write & Redirect-on-write

Jump to solution

Hello Debi... I went through few documents about Unity. There i came to know Unity will use Redirect-on-write for taking snapshots. I still remember somewhere i have studied about Copy-ob-write(CoW). I found this forum to be get discussed about a topic from scratch. thought of utilizing it. I just want to know clear picture about these two terminologies.

Hope this really make some sense.

Regards,

Sam

0 Kudos
Highlighted
4 Tellurium

Re: Copy-on-write & Redirect-on-write

Jump to solution

Hi Samuel Thomas,

I've asked an SME for Unity to weigh in on this. We'll get an answer for you shortly.

0 Kudos
Highlighted
3 Argentum

Re: Copy-on-write & Redirect-on-write

Jump to solution
0 Kudos
Highlighted
2 Bronze

Re: Copy-on-write & Redirect-on-write

Jump to solution

Hi Sam,

So I think you just want to know the differences between the two technologies (Copy-on-first-write and Redirect-on-Write).

Lets first go over CofW: Say you have written some data to a LUN and it occupies data blocks 1 - 5. If you make a snapshot using CofW technology the system will create some private space to hold any original data that you may change. So in this example lets say you are going to make changes to the data on blocks 1 - 3. Before the system writes the new data to those blocks it first copies the data to that private area. Once copied, then the new data will be written to data blocks 1 - 3. Please note that the data on blocks 4 and 5 are not changed so that data does not get copied to the private space. So now the system has captured the view of your data as it was when the snapshot was created. It is important to note that if you again change the data on blocks 1 -3, there is no copy on subsequent writes, only the first write. When you look at the data from the snapshot, the system uses a series of bitmaps and blockmaps to let you see the data as it was snapped. So for example, the maps will point to the original data from blocks 1 - 3 copied to the private area and will also map you to the block 4 and 5 data that has not been changed. The real issue with CofW is that IO is held up until original data is copied to the private area to be preserved.

So the RoW avoids copying the original data, thus avoiding the need to hold the write IO.Here is how it works. So you have data on blocks 1 - 5 and you make a snap. The system now allocates new space from the storage pool to hold new writes and it leaves all of the existing data within the space already consumed, in this case blocks 1 - 5. Thus when you look at the snapshot, you are simply looking at blocks 1 - 5 and the original data is preserved. When new writes are made, the system simply redirects those to the newly allocated space. RoW uses the bitmaps and blockmaps to keep track of the newly allocated space.

Thanks

John

View solution in original post

3 Argentum

Re: Copy-on-write & Redirect-on-write

Jump to solution

Thanks John for brief description.

0 Kudos
Highlighted
1 Copper

Re: Copy-on-write & Redirect-on-write

Jump to solution

Rather interesting and simple. Well, I will try that definitely.

0 Kudos