Horizon DataSys Inc. - Customer Support

Horizon DataSys Community Forum


Go Back   Horizon DataSys Community Forums > Horizon DataSys > Disaster Recovery Programs > RollBack Rx

How RollBack Rx's Snapshot Defragger works

This is a discussion on How RollBack Rx's Snapshot Defragger works within the RollBack Rx forums, part of the Disaster Recovery Programs category; To understand how the Rollback Defragmenter works, we need to first understand a little bit how Rollback Rx works. Rollback ...

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-12-2009, 08:14 AM
Nick10's Avatar
Horizon Staff
 
Join Date: Feb 2009
Location: Burnaby
Posts: 203
Lightbulb How RollBack Rx's Snapshot Defragger works

To understand how the Rollback Defragmenter works, we need to first understand a little bit how Rollback Rx works.

Rollback Rx works based on the following two basic principles:
  1. Intercept every disk IO at the sector level; process the disk IOs according to Snapshot Table (explained in 2).
  2. The Snapshot Table is a very complicated multi-directional tree which records which sector is used by what snapshot. It’s. The snapshot tree table can get very complicated over time.

As illustrated in the diagram below:



a. From Baseline Snapshot, a user creates Snapshot 1.

b. From the Snapshot 1, the user creates Snapshot 2.

c. From the Snapshot 2, the user creates Snapshot 3.

d. From the Snapshot 3, the user restores to the Baseline Snapshot and creates Snapshot 4.

e. From the Snapshot 4, the user restores to the Snapshot 2 and creates Snapshot 5.

f. From the Snapshot 5, the user restores to the Snapshot 1 and creates Snapshot 6.

g. From the Snapshot 6, the user restores to the Snapshot 4 and creates Snapshot 7.


We can see in the diagram, the Snapshot Tree is becoming a spaghetti ball even though we only have 7 snapshots. Imaging how complicate the Snapshot Tree will be if we have 100s of snapshots.

The challenge with Rollback Snapshot Tree is not just creating the tree structure but also the maintenance of the tree structure and the data included in each node of the tree. The maintenance of the Snapshot Trees has two functions:
  1. Optimize the Snapshots Structure after deleting snapshots. For example, according to the diagram above, after deleting the Snapshot 4. We need to optimize the Snapshot tree, so Snapshot 6 becomes the parent of the Snapshot 6 and the Baseline becomes the parent of Snapshot 2. Optimizing Snapshot Tree structures allows Rollback to search and find data included in snapshots faster.
  2. Free up disk space used by a snapshot that’s no longer exists. In the diagram above, if Snapshot 4 contains filse A.doc and B.doc. The file A.doc only exists in the Snapshot 4 but the file B.doc also exists in the Snapshot 2 (a child of Snapshot 4). After deleting the Snapshot 4, Rollback needs to be able to free the disk space used by A.doc but not for the file B.doc.

The maintenance of Rollback Snapshot Tree is done by the Rollback snapshot defragmenter which has three functions:
  1. Optimizing the Snapshot Tree Structure after deleting snapshots off the tree. It’s called DEF1.
  2. Defragging specific snapshots to reclaim disk space after adding/removing snapshots. It’s called DEF2
  3. Defragging the current snapshot to ensure Rollback uses the closest sectors in alignment. It’s called DEF3.


The Snapshot Defragmenter is implemented in both the Rollback subsystem (Pre Windows boot OS) and within the Windows O.S.

These are how the Snapshot Defragmenter implemented in Windows O.S.
  • Three minutes after deleting a snapshot, if the system is in idle state (no mouse and keyboard movement), DEF1 runs. This schedule is hard coded in the program.
  • Three minutes after adding a new snapshot, if the system is in idle state, DEF2 runs. This schedule is hard coded in the program.
  • Every hour, if the system is in idle state, DEF3 runs. This schedule is hard coded in the program.
  • User can go to Rollback Console and run Snapshot Defragmenter at any time. This runs DEF1, DEF2 and DEF3.

These are how the Snapshot Defragmenter implemented in the subsystem .
  • There is a program setting which sets the subsystem to run DEF1 after deleting X snapshots. The default is set to 4.
  • There is program setting which sets the subsystem to run DEF2 after adding X snapshots. The default is set to 4.
  • User can also manually run Snapshot Defragmenter in the subsystem .

What is the difference between the Snapshot Defragmenter in the Subsystem and in the Windows O.S.?

They are exactly the same functions. The reason we need the Snapshot Defragmenter in the subsystem is because some files could be in use while the Windows O.S. is running, so the snapshot defragmenter in Windows might not be able to provide a 100% clean defragmentation. The Snapshot Defragmenter in the subsystem has a complete lock (ownership) of the hard drive before Windows loads - therefore, it can run faster and provide a more complete snapshot defraggmentation.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 09:05 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Site content Copyright (C) 2009 by Horizon DataSys