New-SpacesVolume
Published: February 6, 2013
Updated: February 6, 2013
Applies To: Windows 8, Windows Server 2012
New-SpacesVolume
Syntax
Parameter Set: Default New-SpacesVolume [-StoragePoolFriendlyName] <String> [-SpaceFriendlyName] <String> [-Size] <String> [-ResiliencyType] <String> [-ProvisioningType] <String> [[-DriveLetterToUse] <Char> ] [[-MaximumColumnCount]] [[-InterleaveBytes] <UInt64> ] [[-ClusterSize] <String> ] [[-CreateClusterSharedVolume]] [[-FileSystem] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-ClusterSize<String>
|
Aliases |
none |
|
Required? |
false |
|
Position? |
9 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-CreateClusterSharedVolume
Creates a CSV on the volume.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
10 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-DriveLetterToUse<Char>
Specifies the drive letter to assign to the storage space.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
6 |
|
Default Value |
none |
|
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
|
Accept Wildcard Characters? |
false |
-FileSystem<String>
Specifies the file system to use on the volume. Acceptable values are NTFS and ReFS.
|
Aliases |
none |
|
Required? |
false |
|
Position? |
11 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-InterleaveBytes<UInt64>
|
Aliases |
none |
|
Required? |
false |
|
Position? |
8 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-MaximumColumnCount
|
Aliases |
none |
|
Required? |
false |
|
Position? |
7 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-ProvisioningType<String>
Specifies whether to create a fixed or thinly provisioned storage space. Acceptable values are Fixed or Thin.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
5 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-ResiliencyType<String>
Specifies the resiliency setting to use. Acceptable values are Mirror, Parity, and Simple, which does not include any resiliency.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
4 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-Size<String>
Specifies the size of the storage space.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
3 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-SpaceFriendlyName<String>
Specifies the friendly name of the storage space.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
2 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-StoragePoolFriendlyName<String>
Specifies the friendly name of the storage pool on which to create the storage space.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
1 |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
false |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
-
System.Object
This cmdlet returns an object that contains information about the storage space and the volume hosted on the storage space.
Notes
-
The StorageSpaces module is a downloadable module available for use with Windows Server 2012 and Windows 8. You can download the module from the Script Center.
Examples
Example 1 – Create a thinly provisioned mirror space
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.
PS C:\> New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Thin
Example 2 – Create a thinly provisioned mirror space and assign a specific drive letter
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.
PS C:\> New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Thin -DriveLetterToUse T -FileSystem NTFS
Example 3 – Create a fixed mirror space and create a Cluster Shared Volume
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.
PS C:\> New-SpacesVolume -StoragePoolFriendlyName Internal -SpaceFriendlyName Test -Size (5GB) -ResiliencyType Mirror -ProvisioningType Fixed -CSV
