Share via


CreateOrModifyStoragePool method of the CIM_StorageConfigurationService class

Starts a job to create (or modify) a StoragePool. The StoragePool will be (or must be) scoped to the same System as this Service. One of the parameters for this method is Size. As an input parameter, Size specifies the desired size of the pool. As an output parameter, it specifies the size achieved. Space is taken from either or both of the specified input StoragePools and StorageExtents (InPools and InExtents). The capability requirements that the Pool must support are defined using the Goal parameter. If the requested pool size cannot be created, no action will be taken, the Return Value will be 4097/0x1001, and the output value of Size will be set to the nearest possible size. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If the task will take some time to complete, a ConcreteJob will be created and its reference returned in the output parameter Job.

Syntax

uint32 CreateOrModifyStoragePool(
  [in]      string                 ElementName,
  [out]     CIM_ConcreteJob    REF Job,
  [in]      CIM_StorageSetting REF Goal,
  [in, out] uint64                 Size,
  [in]      string                 InPools[],
  [in]      string                 InExtents[],
  [in, out] CIM_StoragePool    REF Pool
);

Parameters

ElementName [in]

A end user relevant name for the pool being created. If NULL, then a system supplied default name can be used. The value will be stored in the 'ElementName' property for the created pool. If not NULL, this parameter will supply a new name when modifying an existing pool.

Job [out]

Reference to the job (may be null if job completed).

Goal [in]

Reference to an instance of StorageSetting that defines the desired capabilities of the StoragePool. If set to a null value, the default configuration from the source pool will be used. If not NULL, this parameter will supply a new Goal setting when modifying an existing pool.

Size [in, out]

As an input parameter this specifies the desired pool size in bytes. As an output parameter this specifies the size achieved.

InPools [in]

Array of strings containing representations of references to CIM_StoragePool instances, that are used to create the Pool or modify the source pools.

InExtents [in]

Array of strings containing representations of references to CIM_StorageExtent instances, that are used to create the Pool or modify the source extents.

Pool [in, out]

As an input parameter: if null, creates a new StoragePool. If not null, modifies the referenced Pool. When returned, it is a reference to the resulting StoragePool.

Return value

Job Completed with No Error (0)

Not Supported (1)

Unknown (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

In Use (6)

DMTF Reserved (7 4095)

Method Parameters Checked - Job Started (4096)

Size Not Supported (4097)

Method Reserved (4098 32767)

Vendor Specific (32768 65535)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012 R2
Namespace
Root\CIMv2\Storage\iScsiTarget
MOF
SmIscsiTarget.mof
DLL
SMiSCSITargetProv.dll

See also

CIM_StorageConfigurationService