次の方法で共有


CreateOrModifyElementFromStoragePool method of the MSISCSITARGET_StorageConfigurationService class

Starts a job to create or modify a specified element, for example, a MSISCSITARGET_StorageVolume instance from a MSISCSITARGET_StoragePool instance.

This method is inherited from the CIM_StorageConfigurationService class.

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]

Specifies an end-user relevant name for the element to be created. The value is propagated to the ElementName property of the created element. If NULL, a system-supplied default name is used.

If not NULL when modifying an existing element, specifies a new name for the element that is modified.

ElementType [in]

Specifies the type of element that is being created or modified. When modifying an element that is specified in the TheElement parameter, this value must match the type of the specified instance.

The possible values are.

Unknown (0)

Reserved (1)

StorageVolume (2)

StorageExtent (3)

LogicalDisk (4)

DMTF Reserved

5 32767

Vendor Specific

32768 65535

Job [out]

On return, contains a reference to the job, if a job is created and not completed.

Goal [in]

Specifies the characteristics, qualities of service, and goals for the element to maintain. If NULL, the default configuration from the source pool is used. Use a setting or profile instance, such as a MSISCSITARGET_StorageSetting instance that is appropriate for the element to be created.

If not NULL when modifying an existing element, specifies a new goal for the modified element.

Size [in, out]

On input, specifies the wanted size in bytes. If not NULL when modifying an existing element, specifies a new size.

On output, indicates the actual size created.

If the requested size cannot be created, no action is performed.

InPool [in]

Specifies the pool from which to create the element. Must be NULL if an existing element is specified in the TheElement parameter.

TheElement [in, out]

On input, specifies an element to modify, or if NULL, specifies to create a new element.

On output, contains a reference to the created or modified element.

Return value

This method returns one of the following values.

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

MSISCSITARGET_StorageConfigurationService

MSISCSITARGET_StoragePool

MSISCSITARGET_StorageVolume

MSISCSITARGET_StorageSetting