다음을 통해 공유


New-VirtualDisk

New-VirtualDisk

Creates a new virtual disk in the specified storage pool.

Syntax

Parameter Set: ByFriendlyName
New-VirtualDisk [-StoragePoolFriendlyName] <String[]> -FriendlyName <String> [-AsJob] [-AutoNumberOfColumns] [-CimSession <CimSession[]> ] [-Interleave <UInt64> ] [-IsEnclosureAware <Boolean> ] [-NumberOfColumns <UInt16> ] [-NumberOfDataCopies <UInt16> ] [-OtherUsageDescription <String> ] [-PhysicalDiskRedundancy <UInt16> ] [-PhysicalDisksToUse <CimInstance[]> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-UseMaximumSize] [ <CommonParameters>]

Parameter Set: ByName
New-VirtualDisk -FriendlyName <String> -StoragePoolName <String[]> [-AsJob] [-AutoNumberOfColumns] [-CimSession <CimSession[]> ] [-Interleave <UInt64> ] [-IsEnclosureAware <Boolean> ] [-NumberOfColumns <UInt16> ] [-NumberOfDataCopies <UInt16> ] [-OtherUsageDescription <String> ] [-PhysicalDiskRedundancy <UInt16> ] [-PhysicalDisksToUse <CimInstance[]> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-UseMaximumSize] [ <CommonParameters>]

Parameter Set: ByUniqueId
New-VirtualDisk -FriendlyName <String> -StoragePoolUniqueId <String[]> [-AsJob] [-AutoNumberOfColumns] [-CimSession <CimSession[]> ] [-Interleave <UInt64> ] [-IsEnclosureAware <Boolean> ] [-NumberOfColumns <UInt16> ] [-NumberOfDataCopies <UInt16> ] [-OtherUsageDescription <String> ] [-PhysicalDiskRedundancy <UInt16> ] [-PhysicalDisksToUse <CimInstance[]> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-UseMaximumSize] [ <CommonParameters>]

Parameter Set: InputObject (cdxml)
New-VirtualDisk -FriendlyName <String> -InputObject <CimInstance[]> [-AsJob] [-AutoNumberOfColumns] [-CimSession <CimSession[]> ] [-Interleave <UInt64> ] [-IsEnclosureAware <Boolean> ] [-NumberOfColumns <UInt16> ] [-NumberOfDataCopies <UInt16> ] [-OtherUsageDescription <String> ] [-PhysicalDiskRedundancy <UInt16> ] [-PhysicalDisksToUse <CimInstance[]> ] [-ProvisioningType <ProvisioningType> ] [-ResiliencySettingName <String> ] [-Size <UInt64> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [-UseMaximumSize] [ <CommonParameters>]

Detailed Description

The New-VirtualDisk cmdlet creates a new virtual disk in the specified storage pool.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-AutoNumberOfColumns

Specifies that the number of columns used by the virtual disk should be automatically determined. Columns represent the number of underlying physical disks across which one stripe of data for a virtual disk is written.

Aliases

none

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.

Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FriendlyName<String>

Specifies the friendly name for the virtual disk. The friendly name is not required to be unique.

Aliases

VirtualDiskFriendlyName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<CimInstance[]>

Accepts a StoragePool object as input, specifying in which storage pool to create the virtual disk.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Interleave<UInt64>

Specifies the interleave value to use during the creation of a virtual disk. The interleave value represents the number of bytes that is written to a single physical disk. Thus Interleave * NumberOfColumns will yield the size of one stripe of user data.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IsEnclosureAware<Boolean>

Specifies that the enclosure supports SCSI Enclosure Services (SES), which is utilized for providing things like Slot location for a physical disk, as well as to manage LEDs on the disks for visual identification.

Aliases

none

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 allocating the virtual disk.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NumberOfDataCopies<UInt16>

Specifies the number of data copies to create. Specify 2 to create a two-way mirror, or 3 to specify a three-way mirror.

Aliases

none

Required?

false

Position?

named

Default Value

1

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OtherUsageDescription<String>

Specifies an OtherUsageDescription string for the virtual disk. You can use the OtherUsageDescription parameter only if you set the Usage parameter to Other or do not include the Usage parameter.

Aliases

VirtualDiskOtherUsageDescription

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 virtual disk. This value represents how many failed physical disks the virtual disk can tolerate without data loss.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PhysicalDisksToUse<CimInstance[]>

Specifies an array of one or more PhysicalDisk objects. The PhysicalDisk objects represent the specific physical disks on which to create this virtual disk.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProvisioningType<ProvisioningType>

Specifies the type of provisioning. The acceptable values for this parameter are: Fixed, or Thin.

Aliases

none

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 virtual disk. Acceptable values vary by storage subsystem.

Allowed values for the Storage Spaces subsystem are: Simple, Mirror, or Parity.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Size<UInt64>

Specifies the size of the virtual disk 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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StoragePoolFriendlyName<String[]>

Specifies the friendly name of the storage pool in which to create the virtual disk. Enter a friendly name, or use wildcard characters to enter a name pattern.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StoragePoolName<String[]>

Specifies the name of the storage pool in which to create the virtual disk. Enter the name of the storage pool provided by the Storage Management Provider, or use wildcard characters to enter a name pattern.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StoragePoolUniqueId<String[]>

Specifies the ID of the storage pool in which to create the virtual disk Enter an ID or use wildcard characters to enter a pattern.

Aliases

StoragePoolId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Usage<Usage>

Specifies the intended usage of the virtual disk. You can specify one of the predefined descriptions, or use the default value (Other) and instead use the OtherUsageDescription parameter to specify a custom value.

Aliases

none

Required?

false

Position?

named

Default Value

Other

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UseMaximumSize

Creates a virtual disk with the maximimum size possible given the available storage pool space and specified parameters.

Aliases

none

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, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

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

    You can pipe an MSFT_StoragePool object to the InputObject parameter.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk

    The New-VirtualDisk cmdlet returns an object that represents the newly created virtual disk.

Notes

  • The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Examples

Example 1: Creating a 100 GB virtual disk using default settings

This example creates a virtual disk named UserData from the storage pool named CompanyData that is 100GB in size, using the storage pool default settings for unspecified parameters.

PS C:\> New-VirtualDisk -StoragePoolFriendlyName CompanyData -FriendlyName UserData -Size 100GB

Example 2: Creating a thinly-provisioned mirror

This example creates a virtual disk named DataWarehouse, which is 42TB in size, uses the Mirror resiliency setting, and is thinly provisioned.

PS C:\> New-VirtualDisk -StoragePoolFriendlyName CompanyData -FriendlyName DataWarehouse –ResiliencySettingName Mirror -Size 42TB -ProvisioningType Thin

Example 3: Creating a three-way mirror

This example creates a 42 TB thinly-provisioned virtual disk on the Storage Spaces subsystem, using the Mirror resiliency setting with three data copies. This creates a three-way mirror that is capable of tolerating two disk failures).

PS C:\> New-VirtualDisk -StoragePoolFriendlyName CompanyData -FriendlyName BusinessCritical -ResiliencySettingName Mirror -NumberOfDataCopies 3 -Size 42TB -ProvisioningType Thin

Example 4: Creating a two-column mirror

This example creates a thinly-provisioned virtual disk on the Storage Spaces subsystem that uses two columns, regardless of how many physical disks are in the storage pool above the two-disk minimum for a two-way mirror.

PS C:\> New-VirtualDisk -StoragePoolFriendlyName CompanyData -FriendlyName BusinessCritical -ResiliencySettingName Mirror - -Size 42TB -ProvisioningType Thin -NumberOfColumns 2

Add-VirtualDiskToMaskingSet

Connect-VirtualDisk

Disconnect-VirtualDisk

Get-StoragePool

Get-VirtualDisk

Hide-VirtualDisk

New-MaskingSet

Remove-VirtualDisk

Repair-VirtualDisk

Resize-VirtualDisk

Set-VirtualDisk

Show-VirtualDisk