Disk Object

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

A disk object models a host-based, physical disk. The software provider that is running on the local host can access a LUN as a disk when the LUN object is unmasked to the local host. For more information about LUN masking, see the LUN Object.

Each disk object contributes to exactly one pack object; however, a disk can contribute extents to any number of volumes within a pack. You can designate a disk to be a hot spare.

Partition-to-Volume Mapping

The operating system includes support for both basic and dynamic disks. VDS supplies a basic provider and a dynamic provider to manage these disk types. Basic disks are never fault tolerant. Dynamic disks can be fault tolerant if the operating system permits such volume binding. Basic and dynamic disks can contain partitions that are structured according to one of the following partition styles: master boot record (MBR) or GUID partition table (GPT). MBR partitioning has up to four primary partitions, or three primary partitions plus one extended partition having infinite logical drives. GPT partitioning provides up to 128 primary partitions.

The description that follows is general in nature. It shows the typical relationship between partitions and volumes, to which there are several exceptions. For a detailed description of partition-to-volume mapping, see the IVdsAdvancedDisk interface. Partition-to-volume mapping varies depending on the type of disk, basic or dynamic.

  • Basic disks

    A partition on a basic disk maps directly to a volume, in most cases, and can be styled as an MBR or GPT partition. The following illustration shows the mapping for both versions of MBR partitions. In the first case, partitions (P1 through P4) map directly to volumes (V1 through V4). An extended partition (Ext) replaces P4 in the second MBR style. The number of logical drives inside the extended partition that map to volumes is unlimited.


    The GPT partitions (P1 through P128) in the next illustration map directly to volumes (V1 through V128), if all available partitions are in use. A GPT disk does not make use of an extended partition as a way to enhance usability.


  • Dynamic disks

    A special partition type on a dynamic disk maps to a large number of volumes. For an estimated limit that is imposed by the dynamic provider, see the pack object. As the following illustration shows, there can be any number of extents inside P1 that map to volumes.


Regardless of the disk type, a disk can contain one or more disk extents. A disk extent is a contiguous range of logical blocks exposed by the disk. For example, a disk extent can represent an entire volume, one portion of a spanned volume, one member of a striped volume, or one plex of a mirrored volume.

Working with Disks

Use the IVdsPack::AddDisk method to add a disk to an existing pack. Callers can get a pointer to a specific disk by selecting the desired disk object from the enumeration that is returned by the IVdsPack::QueryDisks method. Likewise, you can invoke the IVdsDisk::GetPack method to determine which pack contains a given disk.

You can move a disk from one pack to another by calling the IVdsPack::MigrateDisks method. (VDS does not support migrating a basic disk between packs controlled by the basic provider.) You can also move a pack to another host by physically moving all disks in the pack to the new host. The pack moves with the disks and appears as a foreign pack on the new host. For instructions, see Adding Foreign Disks to a Pack.

In addition to an object identifier, a name, an address, a device type, and a media type, disk object properties include the disk status, health, and flags; the size in bytes, bytes per sector, sectors per track, and tracks per cylinder; and the bus and partition type.

The following table lists related interfaces, enumerations, and structures.

Interfaces that are always exposed by this object IVdsDisk, IVdsDiskOnline, IVdsAdvancedDisk, IVdsAdvancedDisk2, IVdsDiskPartitionMF, IVdsDiskPartitionMF2, and IVdsCreatePartitionEx.

Windows Server 2008:  The IVdsDiskPartitionMF2 interface is not supported.

Windows Vista:  The IVdsDiskOnline interface is not supported until Windows Vista with Service Pack 1 (SP1); use IVdsDisk2 instead. The IVdsDiskPartitionMF2 interface is not supported.

Windows Server 2003:  The IVdsAdvancedDisk2, IVdsDisk2, IVdsDiskOnline, IVdsDiskPartitionMF, and IVdsDiskPartitionMF2 interfaces are not supported.

Interfaces that may be exposed by this object

IVdsRemovable. (See LUN Object for additional interfaces that are exposed if the disk is a LUN.)



Related topics

Software Provider Objects
Pack Object
LUN Object
Adding Foreign Disks to a Pack