walke420
1 Copper

VMware ESXi中的快照技术COW or ROW?

大家好,

有个ESXi中快照相关的问题困扰了我一段时间,网上也去查看了一些资料,但一直都没有搞得很明白,所以发这个贴,希望能有了解这一块的各位大神能够帮助我理解一下。

正如你们知道的一样,快照技术中的COW和ROW最大的不同就是存储变化的数据的位置不同,对于COW,快照之后,如有新数据写入,首先将原有数据copy至预留的快照空间,然后将变化的数据直接写入原有的数据区域,ROW正好相反,新写入的数据或变化的数据都是直接写入预留的快照空间的。

而对于ESXi中的快照,生成快照后,会有快照相关的文件生成,其中就包含Delta disk files,定义如下:

- Delta disk files:         

A .vmdk file to which the guest operating system can write. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time that the previous snapshot was taken. When you take a snapshot, the state of the virtual disk is preserved, which prevents the guest operating system from writing to it, and a delta or child disk is created.

我的理解就是,简单来说,该快照文件会存储自上次创建快照以来发生的数据更改,也就是说快照之后,变化的数据都是写入该快照空间的,从这个角度来说,该快照技术应该属于ROW。

但是呢,从这篇KB里面了解到,它的快照技术是COW

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10151...

The child disk

The child disk, which is created with a snapshot, is a sparse disk. Sparse disks employ the copy-on-write (COW) mechanism, in which the virtual disk contains no data in places, until copied there by a write. This optimization saves storage space. The grain is the unit of measure in which the sparse disk uses the copy-on-write mechanism. Each grain is a block of sectors containing virtual disk data. The default size is 128 sectors or 64 KB.

所以现在就很纳闷了,VMware ESXi中的VM的快照技术到底是COW还是ROW呢?

另外,我也查阅到另外一篇文章,

https://www.ibm.com/developerworks/community/blogs/pcclm/entry/how_do_virtual_machine_snapshots_work...

讲述了VM快照的工作原理,里面也提到是用的COW,但是后面图形举例讲解时,感觉的的确确就是ROW。

不知道是否是理解出现了偏差,希望给予指导。

非常感谢

标签 (1)
标记 (1)
0 项奖励