New-Volume

New-Volume

Creates a volume with the specified file system.

Sintaxis

Parameter Set: ByFriendlyName
New-Volume [-StoragePoolFriendlyName] <String[]> -FileSystem <FileSystem> -FriendlyName <String> [-AccessPath <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-NumberOfColumns <UInt16> ] [-PhysicalDiskRedundancy <UInt16> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-StorageTiers <CimInstance[]> ] [-StorageTierSizes <UInt64[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByName
New-Volume -FileSystem <FileSystem> -FriendlyName <String> -StoragePoolName <String[]> [-AccessPath <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-NumberOfColumns <UInt16> ] [-PhysicalDiskRedundancy <UInt16> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-StorageTiers <CimInstance[]> ] [-StorageTierSizes <UInt64[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByUniqueId
New-Volume -FileSystem <FileSystem> -FriendlyName <String> -StoragePoolUniqueId <String[]> [-AccessPath <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-NumberOfColumns <UInt16> ] [-PhysicalDiskRedundancy <UInt16> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-StorageTiers <CimInstance[]> ] [-StorageTierSizes <UInt64[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
New-Volume -FileSystem <FileSystem> -FriendlyName <String> -InputObject <CimInstance[]> [-AccessPath <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-NumberOfColumns <UInt16> ] [-PhysicalDiskRedundancy <UInt16> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-StorageTiers <CimInstance[]> ] [-StorageTierSizes <UInt64[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Descripción detallada

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).

Parámetros

-AccessPath<String>

Specifies a drive letter or a mount point to assign to the volume.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-FileSystem<FileSystem>

Specifies the file system to use for the volume. The cmdlet formats the volume with the file system you specify. Los valores aceptables para este parámetro son los siguientes:

-- NTFS
-- ReFS
-- CSVFS_NTFS
-- CSVFS_ReFS

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-FriendlyName<String>

Specifies a friendly name. The cmdlet creates the volume with this name.

Alias

VolumeFriendlyName

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-InputObject<CimInstance[]>

Especifica la entrada para este cmdlet. Puede usar este parámetro o puede canalizar la entrada a este cmdlet.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-NumberOfColumns<UInt16>

Specifies the number of columns to create on the virtual disk.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-PhysicalDiskRedundancy<UInt16>

Specifies the physical disk redundancy value to use during the creation of the virtual disk. This value represents how many failed physical disks the virtual disk can tolerate without data loss for two-way mirror spaces (1), three-way mirror spaces (2), single-parity spaces (1), and dual parity spaces (2)..

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ProvisioningType<ProvisioningType>

Specifies the type of provisioning. Los valores aceptables para este parámetro son los siguientes: Fixed, or Thin. Storage spaces that use storage tiers or dual parity must use Fixed provisioning.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ResiliencySettingName<String>

Specifies the name of the desired resiliency setting, for example, Simple, Mirror, or Parity.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Size<UInt64>

Specifies the size of the volume to create.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-StoragePoolFriendlyName<String[]>

Specifies an array of storage pool friendly names. The cmdlet creates the volume in the storage pools you specify.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-StoragePoolName<String[]>

Specifies an array of storage pool names. The cmdlet creates the volume in the storage pools you specify.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-StoragePoolUniqueId<String[]>

Specifies an array of unique IDs, as strings. The cmdlet creates the volume in the storage pools you specify.

Alias

StoragePoolId

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-StorageTiers<CimInstance[]>

Specifies an array of storage tiers. The cmdlet creates the virtual disk for the volume with the storage tiers you specify. To obtain a storage tier object, use the New-StorageTier cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-StorageTierSizes<UInt64[]>

Specifies an array of storage tier sizes. The cmdlet creates the virtual disk for the volume with the storage tier sizes you specify.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Notas

  • 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.

Ejemplos

Example 1: Create a volume on a mirror space

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.

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

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

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.

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