CreateOrModifyElementFromStoragePool method of the CIM_StorageConfigurationService class

Start a job to create (or modify) a specified element (for example a StorageVolume or StorageExtent) from a StoragePool. One of the parameters for this method is Size. As an input parameter, Size specifies the desired size of the element. As an output parameter, it specifies the size achieved. Space is taken from the input StoragePool. The desired settings for the element are specified by the Goal parameter. If the requested size cannot be created, no action will be taken, and the Return Value will be 4097/0x1001. Also, the output value of Size is set to the nearest possible size. If 0 is returned, the function completed successfully and no ConcreteJob instance was required. If 4096/0x1000 is returned, a ConcreteJob will be started to create the element. The Job's reference will be returned in the output parameter Job.

Syntax

uint32 CreateOrModifyElementFromStoragePool(
  [in]      string                 ElementName,
  [in]      uint16                 ElementType,
  [out]     CIM_ConcreteJob    REF Job,
  [in]      CIM_ManagedElement REF Goal,
  [in, out] uint64                 Size,
  [in]      CIM_StoragePool    REF InPool,
  [in, out] CIM_LogicalElement REF TheElement
);

Parameters

ElementName [in]

A end user relevant name for the element 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 element. If not NULL, this parameter will supply a new name when modifying an existing element.

ElementType [in]

Enumeration indicating the type of element being created or modified. If the input parameter TheElement is specified when the operation is a 'modify', this type value must match the type of that instance.

Unknown (0)

Reserved (1)

StorageVolume (2)

StorageExtent (3)

LogicalDisk (4)

DMTF Reserved

5 32767

Vendor Specific

32768 65535

Job [out]

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

Goal [in]

The requirements for the element to maintain. If set to a null value, the default configuration from the source pool will be used. This parameter should be a reference to a Setting or Profile appropriate to the element being created. If not NULL, this parameter will supply a new Goal when modifying an existing element.

Size [in, out]

As an input parameter Size specifies the desired size. If not NULL, this parameter will supply a new size when modifying an existing element. As an output parameter Size specifies the size achieved.

InPool [in]

The Pool from which to create the element. This parameter must be set to null if the input parameter TheElement is specified (in the case of a 'modify' operation).

TheElement [in, out]

As an input parameter: if null, creates a new element. If not null, then the method modifies the specified element. As an output parameter, it is a reference to the resulting element.

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