tags:

views:

570

answers:

2

http://www.petri.co.il/virtual_creating_differencing_disks_with.htm

I followed these steps to create a "Differencing Disks" of the WSSv3 demo VHD from microsoft. Well some time has passed, forgot that it was a "differencing" disk and upon defragging, the VUD (Virtual Undo Disk) expanded to consume the remainder of the free space on my hard drive.

Other then committing these changes back to the original VHD file, is they any other way for me to shrink a VUD.

Thanks

[Update]

Unfortunaelty the change history seems to keep every change to a file, even file fragmentation (why).

org -> verA -> verB -> verC -> verD -> verE -> current.

A tool would be nice to collapse the history tree to something like org -> current and drop/ignore the change history in between as well as defragement the change log for optimization.

[Update#2]

First, Sorry for the extensions to my questions

Second, Is it possible to shrink a differential disk by merging it with its differential parent disk.

Base.VHD
 -> Child.VHD (Differential)
   -> Grandchild.VHD (Differential)

In merging the Grandchild with the Child would the size be [Child Size] + [GrandChild Size] or would it be something like [Child Size] + [Size of Actual File Differences in Grandchild]?

Thanks again.

+2  A: 

The differencing disk recorded every change made by the defragmentation program, which is why it grew out of control. I doubt you can shrink it since it contains changes that have been made and not yet committed.

I think you are going to have to either commit the changes to the original VHD, or throw away all the changes.

Grant Wagner
+2  A: 

Thanks Grant, you're correct and I was stuck with the bloated VHD to merge, but somehow managed to screw that up and lost the changes.

Here is what else I found.

http://www.invirtus.com/blog/?p=7

This is a great article explaining why differentials are so large. Apparently each byte is written into its own 512 byte sector waisting tons of space.

http://www.invirtus.com/downloads/Differencing_Disk_Discussion.ppt

This presentation explains how to use disk compression when storing differencing disks and that undo disks utilize less space. In short, placing you differencing VHD or VUD into a NTFS compressed folder will save you tons of space.

[Example]

I created a differencing disk for the WSSv3 image from Microsoft (5GB), booted it up and installed software. Just the boot processed added 300mb to the VHD, installing TortoiseSVN (20MB) added 200mb, and installing WSPBuilderExtensions (800KB) added 1GB to the VHD.

The end result was 1.5GB differential from installing 21MB. I merged it with the base and resulted in only adding 29MB back to the parent.

I then created another differential VHD inside a NTFS compressed folder, started it up and created a new WSS Web Application through Central Admin. The file size jumped up to 900MB, but only resulted in 90MB on the file system do to the NTFS compression. I then created a VUD, renamed to VHD and completed the same action. The file size increased to 300MB which resulted in 12MB on the file system.

So yes, the differential VHD is highly ineffective and has no intelligence it in what so ever, but the bloating allows for some nice compression.

For development you should also create a new VHD, attach it as a secondary drive and move your file here since any and every file IO is captured in the differencing or undo disk.

Steve
+1 for the additional research and information.
Grant Wagner