ClusterPrepareSharedVolumeForBackup function (resapi.h)

[ClusterPrepareSharedVolumeForBackup is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

A call to this function is not required. The function does not do anything other than retrieve the volume path and the volume name.

Windows Server 2008 R2:  Prepares a cluster shared volume (CSV) for backup. This will mount the CSV locally, pin it to this cluster node, disable direct I/O, and set the volume state to "Backup in Progress".

Syntax

DWORD ClusterPrepareSharedVolumeForBackup(
  [in]      LPCWSTR lpszFileName,
  [out]     LPWSTR  lpszVolumePathName,
  [in, out] LPDWORD lpcchVolumePathName,
  [out]     LPWSTR  lpszVolumeName,
  [in, out] LPDWORD lpcchVolumeName
);

Parameters

[in] lpszFileName

Path to a directory or file on a cluster shared volume.

[out] lpszVolumePathName

Address of buffer that will receive the CSV reparse point.

[in, out] lpcchVolumePathName

Address of a DWORD that on input contains the size of the buffer (in WCHAR characters) pointed to by the lpszVolumePathName parameter and on output contains the size of the string written to that buffer. If size on input is not large enough then the function will fail and return ERROR_MORE_DATA and set the DWORD to the required size.

[out] lpszVolumeName

Address of buffer that will receive the volume GUID path for the CSV.

[in, out] lpcchVolumeName

Address of a DWORD that on input contains the size of the buffer (in WCHAR characters) pointed to by the lpszVolumeName parameter and on output contains the size of the string written to that buffer. If size on input is not large enough then the function will fail and return ERROR_MORE_DATA and set the DWORD to the required size.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns one of the system error codes.

Remarks

The ClusterPrepareSharedVolumeForBackup function must be called from a node of the cluster.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 R2 Enterprise, Windows Server 2008 R2 Datacenter
Target Platform Windows
Header resapi.h
Library ResUtils.Lib
DLL ResUtils.Dll

See also

Backing Up and Restoring the Failover Cluster Configuration Using VSS

Backup and Restore Functions