3.2.1.1.2 Storage Object Relationships

This section describes the hierarchy of interfaces and objects that the Virtual Disk Service Remote Protocol uses and the relationships between those objects.

Relationships between VDS remote protocol objects

Figure 1: Relationships between VDS remote protocol objects

Service Loader and Service: The first interface the client obtains is the IVdsServiceLoader interface. The client invokes IVdsServiceLoader::LoadService to load the VDS service on the specified machine. The server responds with an IVdsService interface for the VDS service that is loaded.

Service and Providers: The client invokes IVdsService::QueryProviders to obtain a list of providers. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each provider that is available on the server. The client invokes QueryInterface on the IUnknown interface to retrieve a IVdsSwProvider or IVdsProvider interface on the provider object.

Service and Subsystems: The client invokes IVdsService::QueryProviders with the flag VDS_QUERY_HARDWARE_PROVIDERS to obtain a list of VDS hardware providers. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each hardware provider that is available on the server. The client invokes QueryInterface on the IUnknown interface to retrieve an IVdsHwProvider interface on the provider object. The client invokes IVdsHwProvider::QuerySubSystems to obtain a list of subsystems. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each subsystem that is available on the server. The client invokes QueryInterface on the IUnknown interface to retrieve an IVdsSubSystemImportTarget interface.

Virtual Disk Providers and Virtual Disks: Similar to hardware-providers, the client invokes IVdsService::QueryProviders with the flag VDS_QUERY_VIRTUALDISK_PROVIDERS to obtain a list of VDS virtual disk providers, each of which implement an IVdsVdProvider interface. The client invokes the IUnknown QueryInterface method to retrieve an IVdsVdProvider interface on the virtual disk provider object. The client then invokes IVdsVdProvider::QueryVDisks to obtain a list of virtual disks that the provider maintains. The server responds with a IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each virtual disk. The client invokes IUnknown::QueryInterface to retrieve an IVdsVDisk interface on the virtual disk object.

Service and Unallocated Disks: The client invokes IVdsService::QueryUnallocatedDisks to obtain a list of disks that do not have a recognized disk partitioning format. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each unallocated disk that is available on the server. The client invokes IUnknown::QueryInterface to retrieve an IVdsDisk, IVdsDisk2, IVdsDisk3, IVdsAdvancedDisk, IVdsAdvancedDisk2, IVdsAdvancedDisk3, IVdsDiskPartitionMF, IVdsDiskPartitionMF2, IVdsCreatePartitionEx, IvdsDiskOnline, or IVdsRemovable interface on the disk object.

Service and Disks: The client invokes IUnknown::QueryInterface on the IVdsService interface to retrieve the IVdsServiceUninstallDisk interface. The client invokes IVdsServiceUninstallDisk::UninstallDisks to uninstall one or more disks that are installed on the server. See section 3.2.1.4. The client invokes IUnknown::QueryInterface on the IVdsService interface to retrieve the IVdsServiceSAN interface. The client invokes IVdsServiceSAN::GetSANPolicy to query the current SAN policy setting, and IVdsServiceSAN::SetSANPolicy to set the SAN policy.

Service and File System Types: The client invokes IVdsService::QueryFileSystemTypes to obtain a list of the file system types that are available for use in formatting volumes. The server returns a list of VDS_FILE_SYSTEM_TYPE_PROP structures.

Service and Drive Letters: The client invokes IVdsService::QueryDriveLetters to obtain a list of drive letters on the system. The server returns a list of VDS_DRIVE_LETTER_PROP structures; the bUsed member indicates whether the drive letter is in use.

Service and HBA Ports: The client invokes IUnknown::QueryInterface on the IVdsService interface to retrieve the IVdsServiceHba interface. The client invokes IVdsServiceHba::QueryHbaPorts to obtain a list of the HBA ports that are connected to the server. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each HBA port that is connected to the machine. The client invokes IUnknown::QueryInterface to retrieve an IVdsHbaPort interface on the HBA port object.

Service and Initiator Adapters: The client invokes IUnknown::QueryInterface on the IVdsService interface to retrieve the IVdsServiceIscsi interface. The client invokes IVdsServiceIscsi::QueryInitiatorAdapters to obtain a list of the iSCSI initiator adapters that are connected to the server. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each initiator adapter that is connected to the machine. The client invokes IUnknown::QueryInterface to retrieve an IVdsIscsiInitiatorAdapter interface on the initiator adapter object.

 Service and Initiator Portals: The client invokes IVdsIscsiInitiatorAdapter::QueryInitiatorPortals to obtain a list of the iSCSI initiator portals that the initiator adapter maintains. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each initiator portal. The client invokes IUnknown::QueryInterface to retrieve an IVdsIscsiInitiatorPortal interface on the initiator portal object.

Providers and Packs: The client invokes IVdsSwProvider::QueryPacks to obtain a list of the packs that the provider maintains. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each pack. The client invokes IUnknown::QueryInterface to retrieve an IVdsPack or IVdsPack2 interface on the pack object.

Packs and Disks: The client invokes IVdsPack::QueryDisks to obtain a list of the disks in the pack. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each disk in the pack. The client invokes IUnknown::QueryInterface to retrieve an IVdsDisk, IVdsDisk2, IVdsDisk3, IVdsAdvancedDisk, IVdsAdvancedDisk2, IVdsAdvancedDisk3,IVdsDiskPartitionMF, IVdsDiskPartitionMF2, IVdsCreatePartitionEx, IvdsDiskOnline, or IVdsRemovable interface on the disk object.

Packs and Volumes: The client invokes IVdsPack::QueryVolumes to obtain a list of the volumes in the pack. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each volume in the pack. The client invokes IUnknown::QueryInterface to retrieve an IVdsVolume, IVdsVolume2, IVdsVolumeOnline, or IVdsVolumeShrink interface on the volume object.

Volumes and Plexes: The client invokes IVdsVolume::QueryPlexes to obtain a list of the plexes for a volume. The server responds with an IEnumVdsObject interface, which enumerates a list of IUnknown interfaces, one for each plex that is associated with the volume. The client invokes IUnknown::QueryInterface to retrieve an IVdsVolumePlex interface on the plex object.

Plexes and Extents: The client invokes IVdsVolumePlex::QueryExtents to obtain a list of the extents for a specified plex. The server returns a list of VDS_DISK_EXTENT structures, one for each extent in use by the plex.

Volumes and Drive Letters: The client invokes IVdsService::QueryDriveLetters to obtain a list of drive letters on the system. The server returns a list of VDS_DRIVE_LETTER_PROP structures; the volumeId member indicates the volume that is associated with the drive letter.

Volumes and Reparse Points: For the IVdsVolume interface, the client invokes IUnknown::QueryInterface to retrieve an IVdsVolumeMF interface. The client then invokes IVdsVolumeMF::QueryReparsePoints to obtain a list of mount points on the volume. The server returns a list of VDS_REPARSE_POINT_PROP structures; the SourceVolumeId member indicates the mounted volume. For example, for drive D mounted to C:\MountD, drive D is the mounted volume.

Volumes and Access Paths: The client invokes IUnknown::QueryInterface to retrieve an IVdsVolumeMF interface. The client then invokes IVdsVolumeMF::QueryAccessPaths to obtain a list of user mode path names for the volume. The server returns a list of drive letters and mount points for the volume. For drive D mounted to C:\MountD, drive D is the mounted volume and C:\MountD is the mount point.

Volumes and Supported File System Formats: The client invokes IUnknown::QueryInterface to retrieve an IVdsVolumeMF2 interface. The client invokes IVdsVolumeMF2::QueryFileSystemFormatSupport to obtain a list of file systems that are supported for the volume. The server returns a list of VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP structures, one for each file system that is supported on the volume.

Disks and Extents: The client invokes IVdsDisk::QueryExtents to obtain a list of the extents for a specified disk. The server returns a list of VDS_DISK_EXTENT structures, one for each extent on the disk. Alternatively, the client invokes IVdsDisk3::QueryFreeExtents to obtain a list of the free extents for a specified disk. The server returns a list of VDS_DISK_FREE_EXTENT structures, one for each extent on the disk that is associated with free space on the disk.

For a VDS_DISK_EXTENT or VDS_DISK_FREE_EXTENT that describes a disk extent, a client maps the extent to its disk by obtaining a list of VDS_DISK_PROP or VDS_DISK_PROP2 structures. The client obtains this list by invoking IVdsPack::QueryDisks followed by IVdsDisk::GetProperties or IVdsDisk3::GetProperties2 for each disk. The server returns a VDS_DISK_PROP structure from IVdsDisk::GetProperties or a VDS_DISK_PROP2 structure from IVdsDisk3::GetProperties2. The client matches the VDS_DISK_EXTENT::diskId or VDS_DISK_FREE_EXTENT::diskId member to the VDS_DISK_PROP::id or VDS_DISK_PROP2::id member.

Disks and partitions: The client invokes IUnknown::QueryInterface to obtain the IVdsAdvancedDisk interface. The client invokes IVdsAdvancedDisk::QueryPartitions to obtain a list of the partitions for a specified disk. The server returns a list of VDS_PARTITION_PROP structures, one for each partition on the disk.

Extents and Volumes: For a VDS_DISK_EXTENT that describes a disk extent, a client maps the extent to its volume by obtaining a list of VDS_VOLUME_PROP structures. The client obtains this list by invoking IVdsPack::QueryVolumes, followed by IVdsVolume::GetProperties or IVdsVolume2::GetProperties2 for each volume. The server returns a VDS_VOLUME_PROP structure from IVdsVolume::GetProperties or a VDS_VOLUME_PROP2 structure from IVdsVolume2::GetProperties2. The client matches the VDS_DISK_EXTENT::volumeId member to the VDS_VOLUME_PROP::id or VDS_VOLUME_PROP2::id member.

Extents and Plexes: For a VDS_DISK_EXTENT that describes a disk extent, a client maps the extent to its volume plex by obtaining a list of VDS_VOLUME_PLEX_PROP structures. The client obtains this list by invoking IVdsVolume::QueryPlexes, followed by IVdsVolumePlex::GetProperties for each plex. The server returns a VDS_VOLUME_PLEX_PROP structure from IVdsVolumePlex::GetProperties or IVdsVolume2::GetProperties2. The client matches the VDS_DISK_EXTENT::plexId member to the VDS_VOLUME_PLEX_PROP::id member.

Volumes and File Systems: For a VDS_FILE_SYSTEM_PROP structure that describes a file system, a client maps the file system to a volume by obtaining a list of VDS_VOLUME_PROP structures. The client invokes IVdsPack::QueryVolumes, followed by IVdsVolume::GetProperties for each volume. The server returns a VDS_VOLUME_PROP structure from IVdsVolume::GetProperties or IVdsVolume2::GetProperties2. The client matches the VDS_FILE_SYSTEM_PROP::volumeId member to the VDS_VOLUME_PROP::id or VDS_VOLUME_PROP2::id member.

Volumes and Drive Letters: For a VDS_DRIVE_LETTER_PROP structure that describes a drive letter, a client maps the drive letter to a volume by obtaining a list of VDS_VOLUME_PROP structures. The client invokes IVdsPack::QueryVolumes, followed by IVdsVolume::GetProperties or IVdsVolume2::GetProperties2 for each volume. The server returns a VDS_VOLUME_PROP structure from IVdsVolume::GetProperties or a VDS_VOLUME_PROP2 structure from IVdsVolume2::GetProperties2. The client matches the VDS_DRIVE_LETTER_PROP::volumeId member to the VDS_VOLUME_PROP::id or VDS_VOLUME_PROP2::id member.