回收差异 VHD 中的空间

发布于 2024-07-15 19:51:39 字数 910 浏览 6 评论 0原文

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

我遵循了这些创建 Microsoft 的 WSSv3 演示 VHD 的“差异磁盘”的步骤。 好吧,已经过去了一段时间,忘记了它是一个“差异”磁盘,并且在进行碎片整理时,VUD(虚拟撤消磁盘)扩展以消耗我的硬盘驱动器上剩余的可用空间。

除了将这些更改提交回原始 VHD 文件之外,还有其他方法可以缩小 VUD。

谢谢

[更新]

不幸的是,更改历史记录似乎保留了对文件的所有更改,甚至是文件碎片(为什么)。

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

如果有一个工具可以将历史树折叠为 org -> 之类的内容,那就太好了。 当前并删除/忽略其间的更改历史记录以及对更改日志进行碎片整理以进行优化。

[更新#2]

首先,很抱歉对我的问题进行了扩展。

其次,是否可以通过将差异磁盘与其差异父磁盘合并来缩小差异磁盘。

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

将孙子与子合并时,大小将是 [子大小] + [孙子大小] 还是类似于 [子大小] + [孙子中实际文件差异的大小]?

再次感谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜扑 2024-07-22 19:51:39

差异磁盘记录了碎片整理程序所做的每一个更改,这就是它失控的原因。 我怀疑您是否可以缩小它,因为它包含已进行但尚未提交的更改。

我认为您必须要么将更改提交到原始 VHD,要么放弃所有更改。

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.

瞎闹 2024-07-22 19:51:39

谢谢格兰特,你是对的,我一直被臃肿的 VHD 合并所困扰,但不知何故设法搞砸了并丢失了更改。

这是我发现的其他内容。

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

这个这是一篇很棒的文章,解释了为什么差异如此之大。 显然,每个字节都被写入自己的 512 字节扇区,占用大量空间。

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

此演示文稿介绍存储差异磁盘时如何使用磁盘压缩以及撤消磁盘占用更少的空间。 简而言之,将不同的 VHD 或 VUD 放入 NTFS 压缩文件夹中将为您节省大量空间。

[示例]

我为 Microsoft 的 WSSv3 映像(5GB)创建了一个差异磁盘,启动它并安装软件。 仅引导处理就为 VHD 添加了 300mb,安装 TortoiseSVN (20MB) 添加了 200mb,安装 WSPBuilderExtensions (800KB) 为 VHD 添加了 1GB。

最终结果与安装的 21MB 相差 1.5GB。 我将它与基础合并,结果只向父级添加了 29MB。

然后,我在 NTFS 压缩文件夹中创建了另一个差异 VHD,启动它并通过 Central Admin 创建了一个新的 WSS Web 应用程序。 文件大小跃升至 900MB,但仅导致文件系统上的 NTFS 压缩为 90MB。 然后我创建了一个 VUD,重命名为 VHD 并完成了相同的操作。 文件大小增加到 300MB,文件系统上的大小为 12MB。

所以,是的,差分 VHD 非常低效,并且没有任何智能,但膨胀允许进行一些很好的压缩。

对于开发,您还应该创建一个新的 VHD,将其作为辅助驱动器附加并将文件移动到此处,因为任何文件 IO 都会在差异或撤消磁盘中捕获。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文