New-AzureStorSimpleDeviceVolume
指定したボリューム コンテナーにボリュームを作成します。
注意
このドキュメントで参照されているコマンドレットは、Service Management API を使用するレガシ Azure リソースを管理するためのものです。 Azure Resource Manager リソースを管理するためのコマンドレットについては、Az PowerShell モジュールを参照してください。
構文
New-AzureStorSimpleDeviceVolume
-DeviceName <String>
-VolumeContainer <DataContainer>
-VolumeName <String>
-VolumeSizeInBytes <Int64>
-AccessControlRecords <System.Collections.Generic.List`1[Microsoft.WindowsAzure.Management.StorSimple.Models.AccessControlRecord]>
-VolumeAppType <AppType>
-Online <Boolean>
-EnableDefaultBackup <Boolean>
-EnableMonitoring <Boolean>
[-WaitForComplete]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
説明
New-AzureStorSimpleDeviceVolume コマンドレットは、指定されたボリューム コンテナーにボリュームを作成します。 このコマンドレットは、各ボリュームを 1 つ以上のアクセス制御レコードに関連付けます。 AccessControlRecord オブジェクトを取得するには、Get-AzureStorSimpleAccessControlRecord コマンドレットを使用します。 ボリュームの名前、サイズ、AppType を指定します。 また、ボリュームをオンラインで作成するかどうか、既定のバックアップを有効にするかどうか、および監視を有効にするかどうかを指定します。
例
例 1: ボリュームを作成する
PS C:\>$AcrList = Get-AzureStorSimpleAccessControlRecord
PS C:\> Get-AzureStorSimpleDeviceVolumeContainer -DeviceName "Contoso63-AppVm" -VolumeContainerName "VolumeContainer07" | New-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume18" -Size 2000000000 -AccessControlRecords $AcrList -VolumeAppType PrimaryVolume -Online $True -EnableDefaultBackup $False -EnableMonitoring $False
VERBOSE: ClientRequestId: a29d1a84-1f81-4f20-9130-7adfe45e41fb_PS
VERBOSE: ClientRequestId: 8fa63df1-3f81-4029-a536-b536a70068ad_PS
VERBOSE: ClientRequestId: 964c5744-8bb1-4f70-beda-95ca4c7f3eb6_PS
VERBOSE: ClientRequestId: f09fff3a-54fa-4a0e-93db-b079260ed2dd_PS
VERBOSE: ClientRequestId: 59aa29e3-8044-411a-adae-b64a2681ffed_PS
VERBOSE: ClientRequestId: 0ffd0297-19be-40fe-a64e-6a2947d831b4_PS
c3b1ad53-7a51-49d7-ae83-94ff1ff3ab90
VERBOSE: The create task is submitted successfully. Please use the command Get-AzureStorSimpleTask -InstanceId
c3b1ad53-7a51-49d7-ae83-94ff1ff3ab90 for tracking the task's status
VERBOSE: Volume container with name: VolumeContainer07 is found.
最初のコマンドは、Get-AzureStorSimpleAccessControlRecord コマンドレットを使用して StorSimple Manager サービス構成のアクセス制御レコードを取得し、$AcrList変数に格納します。
2 番目のコマンドは、Get-AzureStorSimpleDeviceVolumeContainer コマンドレットを使用 して、Contoso63-AppVm という名前のデバイスの VolumeContainer07 という名前のボリューム コンテナーを取得します。 このコマンドは、パイプライン演算子を使用して、そのコンテナーを現在のコマンドレットに渡します。 このコマンドレットは、ボリュームを作成します。 このコマンドは、ボリュームの名前、サイズ、および$AcrListに格納されているアクセス制御レコードを指定します。 このコマンドはジョブを開始し、TaskResponse オブジェクトを返します。 ジョブの状態を表示するには、Get-AzureStorSimpleTask コマンドレットを使用します。
例 2: Access Controlaccess コントロール recordsaccess 制御なしでボリュームを作成する
PS C:\>Get-AzureStorSimpleDeviceVolumeContainer -DeviceName "Contoso63-AppVm" -VolumeContainerName "VolumeContainer01" | New-AzureStorSimpleDeviceVolume -DeviceName "Contoso63-AppVm" -VolumeName "Volume22" -Size 2000000000 -AccessControlRecords @() -VolumeAppType PrimaryVolume -Online $True -EnableDefaultBackup $False -EnableMonitoring $False -WaitForComplete
VERBOSE: ClientRequestId: 3f359790-7e1f-48e7-acf8-ecabba850966_PS
VERBOSE: ClientRequestId: 2723ebcf-cd72-47bb-99b5-0c099d45641b_PS
VERBOSE: ClientRequestId: e605091f-dd63-42a7-bda2-24753cbc1f9a_PS
VERBOSE: ClientRequestId: b3fd08c3-67c5-4309-9591-15d92c360469_PS
VERBOSE: ClientRequestId: 15a024a3-b0c9-4f83-9c34-0ed8b95d024b_PS
VERBOSE: ClientRequestId: c13f92f9-aea1-40dd-af80-3affe273adbe_PS
TaskId : ceef657e-390e-4f7a-aab7-669a29c29e7f
TaskResult : Succeeded
TaskStatus : Completed
ErrorCode :
ErrorMessage :
TaskSteps : {Microsoft.WindowsAzure.Management.StorSimple.Models.TaskStep}
VERBOSE: The task created for your create operation has completed successfully.
VERBOSE: ClientRequestId: 1d79febf-f752-4255-af2d-230d40773bc6_PS
AccessType : NoAccess
AcrIdList : {}
AcrList : {}
AppType : PrimaryVolume
DataContainer : Microsoft.WindowsAzure.Management.StorSimple.Models.DataContainer
DataContainerId : 68b63d15-6aa5-4e69-9f9d-4a0bc607d6e9
InstanceId : SS-VOL-d73b7eec-76fc-4310-b347-69b160de8cdd
InternalInstanceId :
IsBackupEnabled : False
IsDefaultBackupEnabled : False
IsMonitoringEnabled : False
Name : Volume22
Online : True
OperationInProgress : None
SizeInBytes : 2000000000
VSN : SS-VOL-d73b7eec-76fc-4310-b347-69b160de8cdd
VERBOSE: Volume container with name: VolumeContainer01 is found.
このコマンドは、Get-AzureStorSimpleDeviceVolumeContainer コマンドレットを使用 して、Contoso63-AppVm という名前のデバイスの VolumeContainer01 という名前のボリューム コンテナーを取得します。 このコマンドは、パイプライン演算子を使用して、そのコンテナーを現在のコマンドレットに渡します。 このコマンドレットは、ボリュームを作成します。 このコマンドは、ボリュームの名前、サイズ、およびアクセス制御レコードの空の値を指定します。 このコマンドは WaitForComplete パラメーターを指定するため、ボリュームの作成後に TaskStatusInfo を返します。
このコマンドはアクセス制御レコードを指定しないため、このボリュームにはアクセスできません。 Set-AzureStorSimpleDeviceVolume コマンドレットを使用して、後でアクセスを追加できます。
パラメーター
-AccessControlRecords
ボリュームに関連付けるアクセス制御レコードのリストを指定します。
Type: | List<T>[AccessControlRecord] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DeviceName
ボリュームを作成する StorSimple デバイスの名前を指定します。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableDefaultBackup
ボリュームの既定のバックアップを有効にするかどうかを指定します。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableMonitoring
ボリュームの監視を有効にするかどうかを指定します。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Online
ボリュームをオンラインで作成するかどうかを指定します。
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
Azure プロファイルを指定します。
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VolumeAppType
プライマリ ボリュームとアーカイブ ボリュームのどちらを作成するかを指定します。 有効な値は PrimaryVolume と ArchiveVolume です。
Type: | AppType |
Aliases: | AppType |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VolumeContainer
ボリュームを作成する DataContainer オブジェクトとしてコンテナーを指定します。 VirtualDisk オブジェクトを取得するには、Get-AzureStorSimpleDeviceVolumeContainer コマンドレットを使用します。
Type: | DataContainer |
Aliases: | Container |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VolumeName
新しいボリュームの名前を指定します。
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VolumeSizeInBytes
ボリューム サイズをバイト単位で指定します。
Type: | Int64 |
Aliases: | SizeInBytes |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WaitForComplete
このコマンドレットは、Windows PowerShell コンソールに制御を返す前に、操作が完了するまで待機することを示します。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
DataContainer, List\<AccessControlRecord\>
このコマンドレットは、DataContainer オブジェクトと、新しいボリュームの AccessControlRecord オブジェクトの一覧を受け入れます。
出力
TaskStatusInfo
WaitForComplete パラメーターを 指定すると、このコマンドレットは TaskStatusInfo オブジェクトを 返 します。