VMware虚拟磁盘VMDK格式说明书4.Simple Extents

来源:互联网 发布:java捕获被0除的异常 编辑:程序博客网 时间:2024/06/06 12:16
4 Simple Extents
The simplest kinds of extents are backed by a region of a file or a block device. These include the extent types shown in the descriptor as FLAT, VMFS, VMFSRDM, or VMFSRAW.

Note: A virtual disk described as monolithic and flat consists of two files. One file contains the descriptor. The other file is the extent used to store virtual machine data.

Consider an extent that is described by the following line in a descriptor file: 


RW 1048576 FLAT "test-f001.vmdk" 0


This means that the file test-f001.vmdk is (1048576 sectors)×(512 bytes/sector) = (536870912 bytes) = (512MB) in size.
Note: In VMware ESX Server, each link includes only one extent.




4.1 Accessing a Sector in a Flat Extent
Assume you want access to data in a link that is made up of two flat extents. The size of the first extent is C1. The size of the second extent is C2. You want access to sector x in the virtual disk, and x' is the sector offset in extent 1 or 2 where x is located.
-** If x >= C1, the sector is in extent2. Its relative sector offset is
x' = x – C1
-** If x < C1, the sector is in extent1 at offset x.
x' = x
阅读全文
0 0
原创粉丝点击