IVssHardwareSnapshotProvider::GetTargetLuns method (vsprov.h)

The GetTargetLuns method prompts the hardware provider to initialize the VDS_LUN_INFORMATION structures for the newly created shadow copy LUNs. The GetTargetLuns method is called after the IVssProviderCreateSnapshotSet::PostCommitSnapshots method. Identifying information for each newly created LUN is returned to VSS through VDS_LUN_INFORMATION structures.

Note  Hardware providers are only supported on Windows Server operating systems.
 

Syntax

HRESULT GetTargetLuns(
  [in]      LONG                lLunCount,
  [in]      VSS_PWSZ            *rgDeviceNames,
  [in]      VDS_LUN_INFORMATION *rgSourceLuns,
  [in, out] VDS_LUN_INFORMATION *rgDestinationLuns
);

Parameters

[in] lLunCount

Count of LUNs that contribute to the original volume.

[in] rgDeviceNames

Pointer to an array of lLunCount pointers to strings. Each string contains the name of an original LUN to be shadow copied.

[in] rgSourceLuns

Pointer to an array of lLunCountVDS_LUN_INFORMATION structures, one for each LUN that contributes to the original volume.

[in, out] rgDestinationLuns

Pointer to an array of lLunCountVDS_LUN_INFORMATION structures, one for each new shadow copy LUN created during shadow copy processing. There should be a one-to-one correspondence between the elements of the rgSourceLuns and rgDestinationLuns arrays.

Return value

This method can return one of these values.

Return code/value Description
S_OK
0x00000000L
The operation was successfully completed.
E_OUTOFMEMORY
0x8007000EL
Out of memory or other system resources.
E_INVALIDARG
0x80070057L
One of the parameter values is not valid.
VSS_E_PROVIDER_VETO
0x80042306L
An unexpected provider error occurred. The provider must report an event in the application event log providing the user with information on how to resolve the problem.

Remarks

In the rgDestinationLuns parameter, VSS supplies an empty VDS_LUN_INFORMATION structure for each newly created shadow copy LUN. The shadow copy LUNs are not surfaced or visible to the system. The provider should initialize the members of the VDS_LUN_INFORMATION structure with the appropriate SCSI Inquiry Data and Vital Product Data page 80 (device serial number) and page 83 (device identity) information. The structure should contain correct member values such that the shadow copy LUNs can be located by Windows from the original computer or any other computer connected to the SAN.

The members of the VDS_LUN_INFORMATION structure correspond to the page 80 information, with the following exceptions:

  • The m_version member must be set to VER_VDS_LUN_INFORMATION.
  • The m_BusType member is ignored in comparisons during import. This value depends on the PnP storage stack on the corresponding disk device. Usually this is VDSBusTypeScsi.
  • The m_diskSignature member is ignored in comparisons during import. The provider must set this member to GUID_NULL.
The members of the VDS_STORAGE_DEVICE_ID_DESCRIPTOR structure (in the m_deviceIdDescriptor member of the VDS_LUN_INFORMATION structure) correspond to the page 83 information. In this structure, each VDS_STORAGE_IDENTIFIER structure corresponds to the STORAGE_IDENTIFIER structure for a device identifier (that is, a storage identifier with an association type of zero). For more information about the STORAGE_IDENTIFIER structure, see the Windows Driver Kit (WDK) documentation.

The VDS_LUN_INFORMATION structures returned here must be the same as the structures provided in the IVssHardwareSnapshotProvider::FillInLunInfo method during import so that VSS can use this information to identify the newly arriving shadow copy LUNs at import. These same structures will be passed to the provider in the IVssHardwareSnapshotProvider::LocateLuns method.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vsprov.h

See also

IVssHardwareSnapshotProvider

VDS_LUN_INFORMATION