CreateOrModifyElementFromElements method of the CIM_StorageConfigurationService class

Start a job to create (or modify) a specified storage element from specified input StorageExtents. The created or modified storage element can be a StorageExtent, StorageVolume, LogicalDisk, or StoragePool. An input list of InElements must be specified. The GetAvailableExtents method can be used to get a list of valid extents that can be used to achieve a desired goal. Validity of the extents is determined by the implementation. 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 InElements. The desired Settings for the element are specified by the Goal parameter. If the size of Extents passed is less than the size requested, then the capacity is drawn from the extents in the order, left to right, that the Extents were specified. The partial consumption of an Extent is represented by an Extent for the capacity used and an Extent for the capacity not used. If the Size is NULL, then a configuration using all Extents passed will be attempted. 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 CreateOrModifyElementFromElements(
  [in]      string                 ElementName,
  [in]      uint16                 ElementType,
  [out]     CIM_ConcreteJob    REF Job,
  [in]      CIM_ManagedElement REF Goal,
  [in, out] uint64                 Size,
  [in]      CIM_StorageExtent  REF InElements[],
  [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. The actual CIM class of the created TheElement can be vendor-specific, but it must be a derived class of the appropriate CIM class -- i.e., CIM_StorageVolume, CIM_StorageExtent, CIM_LogicalDisk, or CIM_StoragePool.

Unknown (0)

Reserved (1)

Storage Volume (2)

Storage Extent (3)

Storage Pool (4)

Logical Disk (5)

DMTF Reserved

6 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 associated with the Service will be used. This parameter should be a reference to a Setting, SettingData, 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.

InElements [in]

Array of references to storage element instances that are used to create or modify TheElement.

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

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