New-StoragePool

New-StoragePool

Creates a new storage pool using a group of physical disks, and a specific storage subsystem exposed by a storage provider.

構文

Parameter Set: ByFriendlyName
New-StoragePool [-StorageSubSystemFriendlyName] <String[]> -FriendlyName <String> -PhysicalDisks <CimInstance[]> [-AsJob] [-AutoWriteCacheSize <Boolean> ] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-LogicalSectorSizeDefault <UInt64> ] [-OtherUsageDescription <String> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-WriteCacheSizeDefault <UInt64> ] [ <CommonParameters>]

Parameter Set: ByName
New-StoragePool -FriendlyName <String> -PhysicalDisks <CimInstance[]> -StorageSubSystemName <String[]> [-AsJob] [-AutoWriteCacheSize <Boolean> ] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-LogicalSectorSizeDefault <UInt64> ] [-OtherUsageDescription <String> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-WriteCacheSizeDefault <UInt64> ] [ <CommonParameters>]

Parameter Set: ByUniqueId
New-StoragePool -FriendlyName <String> -PhysicalDisks <CimInstance[]> -StorageSubSystemUniqueId <String[]> [-AsJob] [-AutoWriteCacheSize <Boolean> ] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-LogicalSectorSizeDefault <UInt64> ] [-OtherUsageDescription <String> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-WriteCacheSizeDefault <UInt64> ] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
New-StoragePool -FriendlyName <String> -InputObject <CimInstance[]> -PhysicalDisks <CimInstance[]> [-AsJob] [-AutoWriteCacheSize <Boolean> ] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-LogicalSectorSizeDefault <UInt64> ] [-OtherUsageDescription <String> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-WriteCacheSizeDefault <UInt64> ] [ <CommonParameters>]

詳細説明

The New-StoragePool cmdlet creates a new storage pool using a group of physical disks, and a specific storage subsystem exposed by a storage provider.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AutoWriteCacheSize<Boolean>

Indicates whether to set the size of the write-back cache to 1 GB for all types of storage spaces, which include simple, mirror, and parity, to create from the pool. If the number or size of the solid-state drives (SSDs) or journal disks in the storage pool is not sufficient and you specify a value of $True for this parameter, the cmdlet sets the write-back cache size to 0 for simple and mirror spaces, and to 32 MB for parity spaces.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

Session

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnclosureAwareDefault<Boolean>

Specifies the default allocation policy for virtual disks created in an enclosure-aware storage pool. For example, an enclosure-aware subsystem could balance each data copy of the virtual disk across multiple physical enclosures such that each enclosure contains a full data copy of the virtual disk.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-FriendlyName<String>

Specifies a friendly name for the storage pool to be created. The friendly name may be defined by a user and is not guaranteed to be unique.

エイリアス

StoragePoolFriendlyName

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-InputObject<CimInstance[]>

Accepts an object from the pipeline as input.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-LogicalSectorSizeDefault<UInt64>

Specifies the default logical sector size to use for virtual disks created in this pool. Valid logical sector size values (in bytes) for virtual disks created by using the Storage Spaces subsystem are 512 and 4096.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-OtherUsageDescription<String>

Specifies the usage description for the storage pool.

エイリアス

StoragePoolOtherUsageDescription

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PhysicalDisks<CimInstance[]>

Accepts one or more PhysicalDisk objects as input. The Physical Disk CIM objects represent the physical disks to be added to the storage pool.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ProvisioningTypeDefault<ProvisioningType>

Specifies the default type of provisioning for virtual disks created in this pool. このパラメーターに対して使用できる値: Unknown, Fixed or Thin.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ResiliencySettingNameDefault<String>

Specifies the default resiliency setting name for virtual disks created in this pool.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-StorageSubSystemFriendlyName<String[]>

Specifies the friendly name of the storage subsystem on which you want to create the storage pool.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-StorageSubSystemName<String[]>

Specifies the name of the storage subsystem (provided by the Storage Management) on which you want to create the storage pool.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-StorageSubSystemUniqueId<String[]>

Specifies the ID of the storage subsystem on which you want to create the storage pool

エイリアス

StorageSubsystemId

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Usage<Usage>

Specifies the usage setting for the storage pool. このパラメーターに対して使用できる値: Other, ReservedAsDeltaReplicaContainer, ReservedForComputerSystem, ReservedForLocalReplicationServices, ReservedForMigrationServices, ReservedForRemoteReplicationServices, ReservedForSparing, and Unrestricted.

エイリアス

StoragePoolUsage

必須?

false

位置は?

named

既定値

Other

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WriteCacheSizeDefault<UInt64>

Specifies the default write-back cache size for virtual disks in the storage pool.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。

Example 1: Create a new storage pool using Storage Spaces

This example creates a new storage pool named CompanyData using the Storage Spaces subsytem, using the minimum parameters, and assuming that there are no other storage subsystems attached to the computer that have available disks.

This line uses the Get-PhysicalDisk cmdlet to get all PhysicalDisk objects than are not yet in a (concrete) storage pool, and assigns the array of objects to the $PhysicalDisks variable.

PS C:\> $PhysicalDisks = (Get-PhysicalDisk -CanPool $True)

This line creates a new storage pool using the $PhysicalDisks variable to specify the disks to include from the Storage Spaces subsystem (specified with a wildcard * to remove the need to modify the friendly name for different computers).

PS C:\> New-StoragePool -FriendlyName CompanyData -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks

Example 2: Create a new pool and set defaults for virtual disks

This example creates a new storage pool named CompanyData using the Storage Spaces subsystem and sets default values for virtual disk creation.

PS C:\> $PhysicalDisks = (Get-PhysicalDisk -CanPool $True)
PS C:\> New-StoragePool -FriendlyName CompanyData -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks -ResiliencySettingNameDefault Mirror -ProvisioningTypeDefault Thin –Verbose

Example 3: Create a new storage pool, virtual disk, partition, and volume

This example creates a new storage pool, and then makes use of the pipeline to create a new virtual disk in the pool, initialize the disk, create a new partition on the disk, and then format the new partition (volume). Alternatively you can use the New-Volume cmdlet to achieve a similar result in a single command.

The first line ($PhysicalDisks =…) gets the storage subsystem object for the Storage Spaces subsystem, passes it to the Get-PhysicalDisk cmdlet, which then gets the physical disks in the specified subsystem that are available to add to a storage pool, and assigns these disks to the $PhysicalDisks variable.

The second line of the command has five parts, connected by the pipeline (|). The first part (New-StoragePool…) creates a new storage pool using the physical disks in the $PhysicalDisks variable, and then passes the new storage pool down the pipeline. All of the following commands are logically part of one command and should be entered as such.

The second part (New-VirtualDisk…) creates a new virtual disk on the passed in storage pool and then passes the new virtual disk down the pipeline.

The third part (Initialize-Disk…) initializes the disk that was passed in, and then passes the disk down the pipeline.

The fourth part (New-Partition…) creates a new partition on the disk that was passed in, assigns it the next available drive letter, and then passes the partition down the pipeline.

The final part of the command (Format-Volume) formats the partition that was passed in.

PS C:\> $PhysicalDisks = Get-StorageSubSystem -FriendlyName "Storage Spaces*" | Get-PhysicalDisk -CanPool $True 
PS C:\> New-StoragePool -FriendlyName "CompanyData" -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks |New-VirtualDisk -FriendlyName "UserData" -Size 100GB -ProvisioningType Thin |Initialize-Disk -PassThru |New-Partition -AssignDriveLetter -UseMaximumSize |Format-Volume

関連トピック

Get-PhysicalDisk

Get-StoragePool

Get-StorageSubsystem

New-Volume

Remove-StoragePool

Set-StoragePool