New StoragePool - PowerShell


Overview

New-StoragePool creates a new storage pool in an HCI environment. It provides a logical way to consolidate and manage physical storage devices such as SAS/SATA disks, NVMe drives, and SSDs.

Syntax

New-StoragePool [-Name] <string> [-DisplayName] <string> [-Type] <StoragePoolType> [-ReliabilityLevel] <StoragePoolReliabilityLevel> [-TargetStorageLayout] <StorageLayoutTarget> [-PhysicalDiskList] <PSObject[]> [-PhysicalDiskGroupName] <string> [-FriendlyName] <string> [-ProtectionProfile] <string> [-DiskRedundancy] <StoragePoolRedundancy> [-S2DProvisioningState] <S2DProvisioningStateType> [-MaxMirrorsPerNode] <int> [-FileServerPortMode] <S2DFileServerPortModeType> [-HostPoolBalancing] <string> [-HostPoolBalancingMode] <HostPoolBalancingMode> [-IsVirtual] <bool> [-IsNVDIMM] <bool> [-IsHybrid] <bool> [-UseOptane] <bool> [-EnableTieredCaching] <bool> [-UseSharedLogDrive] <bool> [-UseVirtualBus] <bool> [-DisableBandwidthControl] <bool> [-MaxParallelTasksPerSource] <int> [-UseEncryptedPool] <bool> [-EncryptionType] <StoragePoolEncryptionType> [-EncryptionKeyFile] <string> [-EncryptionKey] <SecureString> [-EncryptionKeyHashing] <string> [-NewPhysicalDiskFormat] <bool> [-AllowOversizedPartition] <bool> [-UsePerVolumeHardening] <bool> [-UsePerVolumeResiliency] <bool> [-UseWriteBuffering] <bool> [-PersistentTargetGeneration] <bool> [-IsSsdDiskPool] <bool> [-StoragePoolPhysicalDisks] <StoragePoolPhysicalDisk[]> [-Force] [-WhatIf] [-Confirm]

Options/Flags

| Option | Description |
|—|—|
| -Name | Specifies the name of the storage pool. |
| -DisplayName | Sets the display name of the storage pool. |
| -Type | Defines the type of storage pool to be created. Options include: Disk, Nvme |
| -ReliabilityLevel | Configures the reliability level of the storage pool. Options include: Mirror, TripleMirror, ErasureCoding |
| -TargetStorageLayout | Specifies the target storage layout for the storage pool. Options include: Data, Parity, Log |
| -PhysicalDiskList | An array of physical disk objects to be added to the storage pool. |
| -PhysicalDiskGroupName | Assigns a group name to the physical disks in the storage pool. |
| -FriendlyName | Sets a friendly name for the storage pool. |
| -ProtectionProfile | Selects the protection profile to be applied to the storage pool. |
| -DiskRedundancy | Defines the redundancy level for the storage pool. Options include: Default, Mirror, TripleMirror, ErasureCoding |
| -S2DProvisioningState | Specifies the provisioning state for the storage pool. Options include: NotConfigured, Optimized, Normal |
| -MaxMirrorsPerNode | Sets the maximum number of mirrors per node for the storage pool. |
| -FileServerPortMode | Configures the file server port mode for the storage pool. Options include: Auto, UseTCP, UseRDMA |
| -HostPoolBalancing | Enables or disables host pool balancing for the storage pool. |
| -HostPoolBalancingMode | Specifies the host pool balancing mode for the storage pool. Options include: Auto, PrefersRedundancy, PrefersCapacity |
| -IsVirtual | Indicates whether the storage pool is virtual. |
| -IsNVDIMM | Specifies whether the storage pool is NVDIMM-based. |
| -IsHybrid | Indicates whether the storage pool is hybrid. |
| -UseOptane | Enables or disables the use of Optane drives in the storage pool. |
| -EnableTieredCaching | Activates or deactivates tiered caching for the storage pool. |
| -UseSharedLogDrive | Enables or disables the use of a shared log drive for the storage pool. |
| -UseVirtualBus | Enables or disables the use of a virtual bus for the storage pool. |
| -DisableBandwidthControl | Disables bandwidth control for the storage pool. |
| -MaxParallelTasksPerSource | Sets the maximum number of parallel tasks per source for the storage pool. |
| -UseEncryptedPool | Encrypts the storage pool. |
| -EncryptionType | Specifies the encryption type for the storage pool. Options include: None, Lite, Hash |
| -EncryptionKeyFile | Specifies the path to the encryption key file for the storage pool. |
| -EncryptionKey | Provides the encryption key for the storage pool. |
| -EncryptionKeyHashing | Sets the encryption key hashing algorithm for the storage pool. Options include: Sha256, Sha512 |
| -NewPhysicalDiskFormat | Creates a new physical disk format for the storage pool. |
| -AllowOversizedPartition | Allows the creation of oversized partitions in the storage pool. |
| -UsePerVolumeHardening | Enables per-volume hardening for the storage pool. |
| -UsePerVolumeResiliency | Activates per-volume resiliency for the storage pool. |
| -UseWriteBuffering | Enables write buffering in the storage pool. |
| -PersistentTargetGeneration | Makes the target generation persistent for the storage pool. |
| -IsSsdDiskPool | Indicates whether the storage pool is an SSD disk pool. |
| -StoragePoolPhysicalDisks | An optional array of StoragePoolPhysicalDisk objects that represent the physical disks to be added to the storage pool. |
| -Force | Forces the creation of the storage pool. |
| -WhatIf | Shows what would happen if the command is run without actually creating the storage pool. |
| -Confirm | Prompts for confirmation before creating the storage pool. |

Examples

Example 1: Creating a storage pool with default settings

New-StoragePool -Name "MyStoragePool"

Example 2: Creating a storage pool with custom settings

New-StoragePool -Name "MyCustomStoragePool" -Type Disk -ReliabilityLevel Mirror -PhysicalDiskList @("PhysicalDisk1", "PhysicalDisk2", "PhysicalDisk3") -FriendlyName "Custom Storage Pool"

Common Issues

  • Error creating storage pool: Insufficient physical disks. Ensure that enough physical disks are available and meet the storage pool requirements.
  • Error creating storage pool: Invalid physical disk type. Verify that the physical disks have a compatible type and format.
  • Error creating storage pool: Failed to create logical units. Check the health and availability of the physical disks.

Integration

This command can be integrated with other PowerShell commands and tools for various tasks:

  • Use Get-StoragePool to retrieve information about existing storage pools.
  • Use Set-StoragePool to modify the properties of a storage pool.
  • Use Repair-StoragePool to repair a damaged storage pool.
  • Get-StoragePool
  • Set-StoragePool
  • Repair-StoragePool
  • Get-StorageTier
  • Set-StorageTier