< Back

New-Volume

Wed Jan 30, 2019 6:03 pm

NAME New-Volume



SYNOPSIS

Creates a volume with the specified file system.





SYNTAX

New-Volume [-StoragePool] <CimInstance> [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>]

[-FileSystem <FileSystemType>] [-MediaType <New-Volume.MediaType>] [-NumberOfColumns <UInt16>] [-NumberOfGroups <UInt16>] [-PhysicalDiskRedundancy

<UInt16>] [-ProvisioningType <Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType>] [-ReadCacheSize <UInt64>]

[-ResiliencySettingName <String>] [-Size <UInt64>] [-StorageTierFriendlyNames <String[]>] [-StorageTiers <CimInstance[]>] [-StorageTierSizes <UInt64[]>]

[-ThrottleLimit <Int32>] [-UseMaximumSize] [-WriteCacheSize <UInt64>] -FriendlyName <String> [<CommonParameters>]



New-Volume [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem <FileSystemType>]

[-ThrottleLimit <Int32>] -DiskUniqueId <String> -FriendlyName <String> [<CommonParameters>]



New-Volume [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem <FileSystemType>]

[-ThrottleLimit <Int32>] -DiskPath <String> -FriendlyName <String> [<CommonParameters>]



New-Volume [-DiskNumber] <UInt32> [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem

<FileSystemType>] [-ThrottleLimit <Int32>] -FriendlyName <String> [<CommonParameters>]



New-Volume [-Disk] <CimInstance> [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem

<FileSystemType>] [-ThrottleLimit <Int32>] -FriendlyName <String> [<CommonParameters>]



New-Volume [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem <FileSystemType>]

[-MediaType <New-Volume.MediaType>] [-NumberOfColumns <UInt16>] [-NumberOfGroups <UInt16>] [-PhysicalDiskRedundancy <UInt16>] [-ProvisioningType

<Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType>] [-ReadCacheSize <UInt64>] [-ResiliencySettingName <String>] [-Size

<UInt64>] [-StorageTierFriendlyNames <String[]>] [-StorageTiers <CimInstance[]>] [-StorageTierSizes <UInt64[]>] [-ThrottleLimit <Int32>]

[-UseMaximumSize] [-WriteCacheSize <UInt64>] -FriendlyName <String> -StoragePoolUniqueId <String> [<CommonParameters>]



New-Volume [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem <FileSystemType>]

[-MediaType <New-Volume.MediaType>] [-NumberOfColumns <UInt16>] [-NumberOfGroups <UInt16>] [-PhysicalDiskRedundancy <UInt16>] [-ProvisioningType

<Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType>] [-ReadCacheSize <UInt64>] [-ResiliencySettingName <String>] [-Size

<UInt64>] [-StorageTierFriendlyNames <String[]>] [-StorageTiers <CimInstance[]>] [-StorageTierSizes <UInt64[]>] [-ThrottleLimit <Int32>]

[-UseMaximumSize] [-WriteCacheSize <UInt64>] -FriendlyName <String> -StoragePoolName <String> [<CommonParameters>]



New-Volume [-AccessPath <String>] [-AllocationUnitSize <UInt32>] [-CimSession <CimSession>] [-DriveLetter <Char>] [-FileSystem <FileSystemType>]

[-MediaType <New-Volume.MediaType>] [-NumberOfColumns <UInt16>] [-NumberOfGroups <UInt16>] [-PhysicalDiskRedundancy <UInt16>] [-ProvisioningType

<Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType>] [-ReadCacheSize <UInt64>] [-ResiliencySettingName <String>] [-Size

<UInt64>] [-StorageTierFriendlyNames <String[]>] [-StorageTiers <CimInstance[]>] [-StorageTierSizes <UInt64[]>] [-ThrottleLimit <Int32>]

[-UseMaximumSize] [-WriteCacheSize <UInt64>] -FriendlyName <String> -StoragePoolFriendlyName <String> [<CommonParameters>]





DESCRIPTION

The New-Volume cmdlet creates a volume with the specified file system. The cmdlet manages the creation of the virtual disk with the specified size and

resiliency setting, initializes the disk, creates a partition on it and formats the volume with the specified file system, including Cluster Shared

Volumes (CSVs).





PARAMETERS

-AccessPath [<String>]

Specifies a drive letter, or a mount point.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-AllocationUnitSize [<UInt32>]

Specifies the allocation unit size to use when creating the volume.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-CimSession [<CimSession>]

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or

Get-CimSession cmdlet. The default is the current session on the local computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Disk <CimInstance>

Specifies a Disk object. To obtain a Disk object, use the Get-Disk cmdlet.



Required? true

Position? 1

Default value none

Accept pipeline input? true(ByValue)

Accept wildcard characters? false



-DiskNumber <UInt32>

Specifies the disk number of the disk on which to create a volume.



Required? true

Position? 1

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DiskPath <String>

Specifies the path of the disk on which to create a volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DiskUniqueId <String>

Specifies the ID of the disk on which to create a volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-DriveLetter [<Char>]

Specifies the drive letter of the disk on which to create a volume.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-FileSystem [<FileSystemType>]

Specified the file system to use on the volume. The acceptable values for this parameter are: NTFS, and ReFS, as well as the cluster shared volume

versions of these file systems for use on a scale-out file server: CSVFS_NTFS, and CSVFS_ReFS,



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-FriendlyName <String>

Specifies the friendly name to use for the volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-MediaType [<New-Volume.MediaType>]

Specifies the media type of the storage tier. The cmdlet creates the storage tier for the media type that you specify. The acceptable values for

this parameter are:



-- SSD

-- SCM

-- HDD



Use SCM for storage-class memory such as NVDIMMs.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-NumberOfColumns [<UInt16>]

Specifies the number of columns to use when creating the volume on a Windows Storage subsystem. Columns represent the number of underlying physical

disks across which one stripe of data for a volume is written.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-NumberOfGroups [<UInt16>]

Specifies the number of groups used by Local Reconstruction Coding (LRC) with a dual parity virtual disk. We recommend omitting this parameter and

using the defaults.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-PhysicalDiskRedundancy [<UInt16>]

Specifies the physical disk redundancy value to use during the creation of a volume on a Windows Storage subsystem. This value represents how many

failed physical disks the volume can tolerate without data loss. Redundancy values are as follows:



-- For two-way mirror spaces, the virtual disk can tolerate 1 failed physical disk without data loss.

-- For three-way mirror spaces, the virtual disk can tolerate 2 failed physical disks without data loss.

-- For single-parity spaces, the virtual disk can tolerate 1 failed physical disk without data loss.

-- For dual-parity spaces the virtual disk can tolerate 2 failed physical disks without data loss.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ProvisioningType [<Microsoft.PowerShell.Cmdletization.GeneratedTypes.SetStoragePool.ProvisioningType>]

Specifies the type of provisioning. The acceptable values for this parameter are: Fixed and Thin. Specify Fixed for storage spaces that use storage

tiers or a clustered storage pool



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ReadCacheSize [<UInt64>]

This parameter is no longer supported.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ResiliencySettingName [<String>]

Specifies the resiliency setting (storage layout) to use for the volume. Acceptable values vary by storage subsystem.



Allowed values for the Windows Storage subsystem are: Simple, Mirror, or Parity. By default, when you specify Mirror, Storage Spaces creates a

two-way mirror, and when you specify Parity, Storage Spaces creates a single-parity space.



To create a three-way mirror space, specify 3 for the NumberofDataCopies parameter or 2 for the PhysicalDiskRedundancy parameter.



To create a dual-parity space, specify 2 for the PhysicalDiskRedundancy parameter and Fixed provisioning for the ProvisioningType parameter.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Size [<UInt64>]

Specifies the size of the volume to create. The default unit is bytes. To specify a different unit, enter the size followed by one of the following

unit values, with no spaces: Bytes, KB, MB, GB, or TB.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePool <CimInstance>

Specifies the storage pool object in which you want to create a volume. To obtain a storage pool object, use the Get-StoragePool cmdlet.



Required? true

Position? 1

Default value none

Accept pipeline input? true(ByValue)

Accept wildcard characters? false



-StoragePoolFriendlyName <String>

Specifies the friendly name of the storage pool in which to create a volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePoolName <String>

Specifies the name of the storage pool in which to create a volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StoragePoolUniqueId <String>

Specifies the unique ID of the storage pool in which to create a volume.



Required? true

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StorageTierFriendlyNames [<String[]>]

Specifies the names of storage tiers to use when creating the volume.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StorageTiers [<CimInstance[]>]

Specifies the storage tier objects to use when creating the volume.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-StorageTierSizes [<UInt64[]>]

Specifies how big to make each storage tier on this volume.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ThrottleLimit [<Int32>]

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is

entered, then Windows PowerShell???? calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the

computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-UseMaximumSize [<SwitchParameter>]

Indicates that this cmdlet creates the largest volumn possible.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-WriteCacheSize [<UInt64>]

Specifies the size of the write-back cache. The cmdlet creates the write-back cache of the size that you specify when the cmdlet creates the virtual

disk space.



The following describes the behavior of this parameter based on the value that you specify:



-- 1. If you do not specify this parameter, the cmdlet sets the value of the WriteCacheSizeDefault property from the storage pool.

-- 2. The default setting of WriteCacheSizeDefault for a storage pool is Auto, which specifies that Windows Server automatically selects the optimal

write-back cache size for your configuration. You can change the value of WriteCacheSizeDefault to a concrete value at any time.

-- 3. The Auto setting for WriteCacheSize operates as follows:

---- a. If any of the following is true, Auto is set to 1 GB:

------ i. The storage pool contains at least N drives with enough capacity and you set the Usage parameter to Journal. N = 1 for simple spaces, N =

2 for two-way mirror and single parity, N = 3 for three-way mirror and dual parity.

------ ii. The storage pool contains at least N drives with enough capacity and the media type of the virtual disk is set to SSD. N = 1 for simple

spaces, N = 2 for two-way mirror and single parity, N = 3 for three-way mirror and dual parity.

---- b. Otherwise, Auto is set to 0 (no log) for simple and mirror spaces, and 32 MB for parity spaces.

-- 4. If you specify Auto or 0 (zero) for this parameter and the storage space is not a parity space, the cmdlet verifies that either 3.a.i or

3.a.ii is true. If either 3.a.i or 3.a.ii is not true, you cannot set WriteCacheSize to Auto or 0.

---- a. The objective of these conditions is to help you avoid scenarios in which you force the creation of a write-back cache in situations that

result in slower performance.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool

http://msdn.microsoft.com/library/windo ... 30551.aspx





You can use the pipeline operator to pass an MSFT_StoragePool object to the InputObject parameter.





OUTPUTS

Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/Storage/MSFT_Volume

http://msdn.microsoft.com/library/windo ... 30604.aspx





This cmdlet outputs an object that represents the newly created volume.





NOTES





To create a volume on a new storage space with enclosure-awareness enabled (providing resiliency for an entire JBOD enclosure failure), use the

Set-StoragePool cmdlet with the ????????EnclosureAwareDefault $true parameter to set the storage pool to create storage spaces with enclosure awareness

enabled by default.





Example 1: Create a volume on a mirror space



PS C:\\> New-Volume -StoragePoolName "CompanyData" -FriendlyName "TestVolume" -Size 10GB -ResiliencySettingName "Mirror" -FileSystem NTFS -AccessPath "M:

"-ProvisioningType Fixed



This command creates a new storage space in the CompanyData pool using the Mirror resiliency setting and fixed provisioning, and then formats the volume

with the NTFS file system and assigns drive letter M.





Example 2: Create a volume on a new tiered storage space



PS C:\\>New-Volume -StoragePoolFriendlyName "CompanyData" -FriendlyName "UserData" -AccessPath "M:" -ResiliencySettingName "Mirror" -ProvisioningType

"Fixed" -StorageTiers (Get-StorageTier -FriendlyName "*SSD*"), (Get-StorageTier -FriendlyName "*HDD*") -StorageTierSizes 20GB, 80GB -FileSystem NTFS



This command creates new storage space in the CompanyData pool using the Mirror resiliency setting, fixed provisioning, a 20 GB SSD storage tier, and an

80 GB HDD storage tier, and then formats the volume with the NTFS file system and assigns drive letter M.







RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=816443

Debug-Volume

Format-Volume

Get-DiskStorageNodeView

Get-StoragePool

Get-Volume

Optimize-Volume

Repair-Volume

Set-Volume