次の方法で共有


CreateStorageGroup method of the MSFT_SMSystem class

Creates a Storage Group (SPC).

Syntax

Uint32 CreateStorageGroup(
  [in]            String                  Name,
  [in]            String                  LUNames[],
  [in]            String                  DeviceNumbers[],
  [in]            Uint16                  DeviceAccesses[],
  [in]            String                  InitiatorID,
  [in]            String                  TargetPortIDs[],
  [in]            Uint16                  HostType = Microsoft Windows,
  [out]           MSFT_SMStorageGroup REF StorageGroup,
  [out]           MSFT_SMJob          REF Job,
  [out, optional] MSFT_SMExtendedStatus   ExtendedStatus,
  [in, optional]  String                  username,
  [in, optional]  String                  password
);

Parameters

Name [in]

Name to be assigned to the StorageGroup.

LUNames [in]

An array of IDs of existing logical unit instances.

Note

IDs must match the Name property of LogicalDevice instances that represent SCSI logical units.

DeviceNumbers [in]

Logical unit numbers to assign to the corresponding item in the LUNames parameter. If this parameter is NULL, all LU numbers are assigned by the hardware or instrumentation.

DeviceAccesses [in]

The permissions to assign to the corresponding logical unit in the LUNames parameter. Setting this to 'No Access' assigns the DeviceNumber for the associated initiators, but does not grant read or write access. If the LUNames parameter is not NULL then this parameter is required.

The possible values are.

Unknown (0)

Read Write (2)

Read-Only (3)

No Access (4)

InitiatorID [in]

ID of an initiator port.

TargetPortIDs [in]

IDs of target ports.

HostType [in]

Defines the operating system, version, driver, and other host environment factors that influence the behavior exposed by storage systems.

The possible values are.

Unknown (0)

Other (1)

Standard (2)

Solaris (3)

HPUX (4)

OpenVMS (5)

Tru64 (6)

Netware (7)

Sequent (8)

AIX (9)

DGUX (10)

Dynix (11)

Irix (12)

Cisco iSCSI Storage Router (13)

Linux (14)

Microsoft Windows (15)

OS400 (16)

TRESPASS (17)

HI-UX (18)

VMware ESXi (19)

Microsoft Windows Server 2008 (20)

Microsoft Windows Server 2003 (21)

DMTF Reserved

22 32767

Vendor Specific

32768 65535

Windows Server 2012: This parameter is, incorrectly, named HostMode.

Windows Server 2012: The default for this parameter is 15, Microsoft Windows.

StorageGroup [out]

Reference to the created MSFT_SMStorageGroup (SCSIProtocolController) instance.

Job [out]

Reference to the MSFT_SMJob instance. May be NULL if the job is completed.

Windows Server 2012: This parameter is not supported.

ExtendedStatus [out, optional]

An MSFT_SMExtendedStatus object containing the results of calling this method.

username [in, optional]

Used to authenticate with the SMI-S provider. If not provided, the storage service attempts to obtain these credentials from the configuration provider.

password [in, optional]

Used to authenticate with the SMI-S provider. If not provided, the storage service attempts to obtain these credentials from the configuration provider.

Return value

Success (0)

Not Supported (1)

Unspecified Error (2)

Timeout (3)

Failed (4)

Invalid Parameter (5)

Method Parameters Checked - Job Started (4096)

Invalid logical unit ID (4097)

Invalid initiator port ID (4098)

Invalid target port ID (4099)

Invalid permission (4100)

Target/initiator combination already exposed (4101)

Requested logical unit number in use (4102)

Maximum Map Count Exceeded (4103)

StorageService: Error LUNames Required (40000)

StorageService: Errpr InitiatorID Required (40005)

StorageService: Error TargetPortID Required (40010)

StorageService: DeviceAccess Array Size not equal to LUNames Array Size (40015)

StorageService: DeviceAccess value is not supported (40016)

StorageService: LU Not Found (40020)

StorageService: Max Map Count for LU Exceeded (40025)

StorageService: Client Should not specify DeviceNumbers for this Array (40030)

StorageService: DeviceNumbers Array Size not equal to LUNames Array Size (40035)

StorageService: DeviceNumbers Array contains invalid numbers - Acceptable range is 0-254 (40036)

StorageService: InitiatorID and TargetPortID Combination is associated to another StorageGroup(s);First One is Returned (40040)

StorageService: Success, But Multiple StorageGroups (SPCs) Created. First One Returned (40045)

StorageService: Success, But Unable To Update StorageGroup (SPC) Name (40050)

StorageService: Unable To Wait For Job Completion (40055)

StorageService: Unable To Get StroageGroup (SPC) From Job (40060)

StorageService: Unable To Get MaskingGroup From Job (40061)

StorageService: Success, But Unable to set SPC Name. StorageGroup Name is Already in Use (40090)

StorageService: Success, But ElementName Is Not Settable Per Provider's capabilities (40095)

StorageService: Provider does not support masking and mapping operations (40107)

StorageService: SPC already exists (40110)

StorageService: Unable to Find or Create a StorageHardwareID Object on the provider (40115)

StorageService: Unable to Find the StorageVolume Object(s) on the provider (40116)

StorageService: Unable to Find a TargetMaskingGroup that contains all the provided TargetPorts (40117)

StorageService: Failed to Find a TargetMaskingGroup that contains all the provided TargetPorts (40118)

StorageService: Warning StorageClientSettingData Not Supported on provider (40300)

StorageService: Error processing of StorageClientSettingData (40700)

StorageService: Error StorageClientSettingData specified HostType was Not Found (40701)

StorageService: Warning StorageClientSettingData HostType Not Found. Other or Standard HostType was used instead (40702)

StorageService: Error StorageClientSettingData not found for the specified HardwareId (40703)

StorageService: Error StorageClientSettingData provider failure (40704)

StorageService: Method invocation failed (40705)

StorageService: Error: Provider job completed with errors (41000)

StorageService CIM Error: Failed (43001)

StorageService CIM Error: Access denied (43002)

StorageService CIM Error: Invalid namespace (43003)

StorageService CIM Error: Invalid parameter (43004)

StorageService CIM Error: Invalid class (43005)

StorageService CIM Error: Not found (43006)

StorageService CIM Error: Not supported (43007)

StorageService CIM Error: Class has children (43008)

StorageService CIM Error: Class has instances (43009)

StorageService CIM Error: Invalid superclass (43010)

StorageService CIM Error: Already exists (43011)

StorageService CIM Error: No such property (43012)

StorageService CIM Error: Type mismatch (43013)

StorageService CIM Error: Query language not supported (43014)

StorageService CIM Error: Invalid query (43015)

StorageService CIM Error: Method not available (43016)

StorageService CIM Error: Method not found (43017)

StorageService CIM Error: Unexpected response (43018)

StorageService CIM Error: Invalid response destination (43019)

StorageService CIM Error: Namespace not empty (43020)

StorageService CIM Error: Invalid enumeration context (43021)

StorageService CIM Error: Invalid operation timeout (43022)

StorageService CIM Error: Pull has been abandoned (43023)

StorageService CIM Error: Pull cannot be abandoned (43024)

StorageService CIM Error: Filtered enumeration not supported (43025)

StorageService CIM Error: Continuation on error not supported (43026)

StorageService CIM Error: Server limits exceeded (43027)

StorageService CIM Error: Server is shutting down (43028)

StorageService CIM Error: Query feature not supported (43029)

StorageService: Generic Failure (51000)

StorageService: Invalid connection credentials (51005)

StorageService: SSL connection failure (51010)

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\Storage\SM
MOF
MsftStrgMan.mof
DLL
StorageService.dll

See also

MSFT_SMSystem