New-SpacesVolume

Creates a storage space and then creates and formats a volume on the storage space.

Syntax

New-SpacesVolume
   [-StoragePoolFriendlyName] <String>
   [-CreateClusterSharedVolume]
   [[-FileSystem] <String>]
   [-SpaceFriendlyName] <String>
   [-Size] <String>
   [-ResiliencyType] <String>
   [-ProvisioningType] <String>
   [[-DriveLetterToUse] <Char>]
   [-MaximumColumnCount]
   [[-InterleaveBytes] <UInt64>]
   [[-ClusterSize] <String>]
   [-Confirm]
   [-WhatIf]

Description

The New-SpacesVolume cmdlet creates a storage space, initializes the new virtual disk (storage space), creates a partition on virtual disk, and then formats the volume. It can also optionally create a Cluster Shared Volume (CSV) on the newly formatted volume when run on a failover cluster.

Examples

Example 1 - Create a thinly provisioned mirror space

PS C:\>New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Thin

This example creates a storage space named Test, which is a thinly provisioned mirror space, and then creates and formats a volume on the storage space.

Example 2 - Create a thinly provisioned mirror space and assign a specific drive letter

PS C:\>New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Thin -DriveLetterToUse T -FileSystem NTFS

This example creates a storage space named Test, which is a thinly provisioned mirror space, and then creates and formats an NTFS volume on the storage space, and assigns drive letter T to the volume.

Example 3 - Create a fixed mirror space and create a Cluster Shared Volume

PS C:\>New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Fixed -CSV

This example creates a 5GB mirror space, with fixed provisioning, and creates a Cluster Shared Volume (CSV) after creation. Note: Requires a clustered storage pool.

Parameters

-ClusterSize

Type:String
Position:9
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CreateClusterSharedVolume

Creates a CSV on the volume.

Type:SwitchParameter
Position:10
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DriveLetterToUse

Specifies the drive letter to assign to the storage space.

Type:Char
Position:6
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-FileSystem

Specifies the file system to use on the volume. Acceptable values are NTFS and ReFS.

Type:String
Position:11
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InterleaveBytes

Type:UInt64
Position:8
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MaximumColumnCount

Type:SwitchParameter
Position:7
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProvisioningType

Specifies whether to create a fixed or thinly provisioned storage space. Acceptable values are Fixed or Thin.

Type:String
Position:5
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResiliencyType

Specifies the resiliency setting to use. Acceptable values are Mirror, Parity, and Simple, which does not include any resiliency.

Type:String
Position:4
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Size

Specifies the size of the storage space.

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SpaceFriendlyName

Specifies the friendly name of the storage space.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StoragePoolFriendlyName

Specifies the friendly name of the storage pool on which to create the storage space.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object

This cmdlet returns an object that contains information about the storage space and the volume hosted on the storage space.