Creating a Volume
You can create volumes that you can attach to FCU virtual machines (VMs) created within the same Subregion. Volumes enable you to add storage capacity to a VM if the root device has reached its storage capacity limit, or to separate the storage of your data from the operating system files of VM.
Creating a Volume Using Cockpit
|
You can also do this action in the Snapshots dashboard, by selecting a Snapshot, and clicking |
-
In the Volumes dashboard, click
Create Volume.
The CREATE VOLUME dialog box appears. -
In the Name field, type a name for the volume.
This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.
-
In the Type list, select a type for the volume:
-
standardfor a Magnetic volume -
io1for an Enterprise volume -
gp2for a Performance volume
For more information about the different types of volumes, see About Volumes > Volume Types and IOPS.
-
-
In the Size field, type a size for the volume or select it using the arrows.
The minimum size allowed for a volume is:
-
1 GiB for
standard -
1 GiB for
gp2 -
4 GiB for
io1
The maximum size allowed for a volume is 14901 GiB.
-
-
(
io1volumes only) In the IOPS field, type the number of IOPS for the volumes or select it using the arrows.The maximum number of IOPS allowed for
io1volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte. -
In the Snapshot list, leave None selected.
To create a volume from a snapshot, you can select a snapshot in the Snapshot list. For more information, see Creating a Volume from a Snapshot.
-
In the Subregion list, select the Subregion in which you want to create the volume.
By default, the Subregion A is selected.
-
In the Count field, type the number of volumes you want to create or select it using the arrows.
-
Click Create.
The volume is created.
Creating a Volume Using OSC CLI
The CreateVolume command creates a Block Storage Unit (BSU) volume in a specified Region.
BSU volumes can be attached to a virtual machine (VM) in the same Subregion. You can create an empty volume or restore a volume from an existing snapshot.
You can create the following volume types: Enterprise (io1) for provisioned IOPS SSD volumes, Performance (gp2) for general purpose SSD volumes, or Magnetic (standard) volumes.
For more information, see About Volumes.
$ osc-cli api CreateVolume --profile "default" \
--VolumeType "io1" \
--SubregionName "eu-west-2a" \
--Size 10 \
--Iops 100
This command contains the following attributes that you need to specify:
-
ClientToken: (optional) A unique identifier which enables you to manage the idempotency. -
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
Iops: (optional) The number of I/O operations per second (IOPS). This parameter must be specified only if you create anio1volume. The maximum number of IOPS allowed forio1volumes is13000with a maximum performance ratio of 300 IOPS per gibibyte. -
Size: (optional) The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 GiB. This parameter is required if the volume is not created from a snapshot (SnapshotIdunspecified). -
SubregionName: The Subregion in which you want to create the volume. -
VolumeType: (optional) The type of volume you want to create (io1|gp2|standard). If not specified, astandardvolume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
The CreateVolume command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
-
Volume: Information about the volume.-
ClientToken: The idempotency token provided when creating the volume. -
CreationDate: The date and time (UTC) at which the volume was created. -
Iops: The number of I/O operations per second (IOPS):-
For
io1volumes, the number of provisioned IOPS -
For
gp2volumes, the baseline performance of the volume
-
-
LinkedVolumes: Information about your volume attachment.-
DeleteOnVmDeletion: If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. -
DeviceName: The name of the device. -
State: The state of the attachment of the volume (attaching|detaching|attached|detached). -
VmId: The ID of the VM. -
VolumeId: The ID of the volume.
-
-
Size: The size of the volume, in gibibytes (GiB). -
SnapshotId: The snapshot from which the volume was created. -
State: The state of the volume (creating|available|in-use|deleting|error). -
SubregionName: The Subregion in which the volume was created. -
Tags: One or more tags associated with the volume.-
Key: The key of the tag, with a minimum of 1 character. -
Value: The value of the tag, between 0 and 255 characters.
-
-
TaskId: The ID of the volume update task in progress. Otherwise, it is not returned. -
VolumeId: The ID of the volume. -
VolumeType: The type of the volume (standard|gp2|io1).
-
{
"Volume": {
"VolumeId": "vol-12345678",
"Tags": [],
"VolumeType": "io1",
"SubregionName": "eu-west-2a",
"State": "creating",
"CreationDate": "2010-10-01T12:34:56.789Z",
"Iops": 100,
"LinkedVolumes": [],
"Size": 10
},
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Creating a Volume Using oapi-cli
The CreateVolume command creates a Block Storage Unit (BSU) volume in a specified Region.
BSU volumes can be attached to a virtual machine (VM) in the same Subregion. You can create an empty volume or restore a volume from an existing snapshot.
You can create the following volume types: Enterprise (io1) for provisioned IOPS SSD volumes, Performance (gp2) for general purpose SSD volumes, or Magnetic (standard) volumes.
For more information, see About Volumes.
$ oapi-cli --profile "default" CreateVolume \
--VolumeType "io1" \
--SubregionName "eu-west-2a" \
--Size 10 \
--Iops 100
This command contains the following attributes that you need to specify:
-
ClientToken: (optional) A unique identifier which enables you to manage the idempotency. -
DryRun: (optional) If true, checks whether you have the required permissions to perform the action. -
Iops: (optional) The number of I/O operations per second (IOPS). This parameter must be specified only if you create anio1volume. The maximum number of IOPS allowed forio1volumes is13000with a maximum performance ratio of 300 IOPS per gibibyte. -
Size: (optional) The size of the volume, in gibibytes (GiB). The maximum allowed size for a volume is 14901 GiB. This parameter is required if the volume is not created from a snapshot (SnapshotIdunspecified). -
SubregionName: The Subregion in which you want to create the volume. -
VolumeType: (optional) The type of volume you want to create (io1|gp2|standard). If not specified, astandardvolume is created.
For more information about volume types, see About Volumes > Volume Types and IOPS.
The CreateVolume command returns the following elements:
-
ResponseContext: Information about the context of the response.-
RequestId: The ID of the request.
-
-
Volume: Information about the volume.-
ClientToken: The idempotency token provided when creating the volume. -
CreationDate: The date and time (UTC) at which the volume was created. -
Iops: The number of I/O operations per second (IOPS):-
For
io1volumes, the number of provisioned IOPS -
For
gp2volumes, the baseline performance of the volume
-
-
LinkedVolumes: Information about your volume attachment.-
DeleteOnVmDeletion: If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM. -
DeviceName: The name of the device. -
State: The state of the attachment of the volume (attaching|detaching|attached|detached). -
VmId: The ID of the VM. -
VolumeId: The ID of the volume.
-
-
Size: The size of the volume, in gibibytes (GiB). -
SnapshotId: The snapshot from which the volume was created. -
State: The state of the volume (creating|available|in-use|deleting|error). -
SubregionName: The Subregion in which the volume was created. -
Tags: One or more tags associated with the volume.-
Key: The key of the tag, with a minimum of 1 character. -
Value: The value of the tag, between 0 and 255 characters.
-
-
TaskId: The ID of the volume update task in progress. Otherwise, it is not returned. -
VolumeId: The ID of the volume. -
VolumeType: The type of the volume (standard|gp2|io1).
-
{
"Volume": {
"VolumeId": "vol-12345678",
"Tags": [],
"VolumeType": "io1",
"SubregionName": "eu-west-2a",
"State": "creating",
"CreationDate": "2010-10-01T12:34:56.789Z",
"Iops": 100,
"LinkedVolumes": [],
"Size": 10
},
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Creating a Volume Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To create a volume, use the create-volume command following this syntax:
$ aws ec2 create-volume \
--profile YOUR_PROFILE \
--size 50 \
--availability-zone eu-west-2a \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following options that you need to specify:
-
(optional)
profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
(optional)
size: The size of the volume, in GiB.The maximum size allowed for a volume is 14901 GiB.
This parameter is required if the volume is not created from a snapshot (
snapshot-idunspecified). -
(optional)
volume-type: The type of the volume (standard|gp2|io1). For more information about volume types, see About Volumes > Volume Types and IOPS.If not specified, a
standardvolume is created. -
(optional)
snapshot-id: The ID of the snapshot from which you want to create the volume. -
(optional)
iops: The number of IOPS.The maximum number of IOPS allowed for
io1volumes is 13000 with a maximum performance ratio of 300 IOPS per gibibyte.This parameter must be specified only if you create an
io1volume. -
availability-zone: The Availability Zone where you want to place the volume. -
endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The create-volume command returns the following elements:
-
AvailabilityZone: The Availability Zone where the volume is created. -
Tags: One or more tags associated with the volume. -
VolumeType: The type of volume. For more information, see About Volumes > Volume Types and IOPS. -
VolumeId: The ID of the volume. -
State: The state of the volume (alwayscreatingwhen creating a volume). -
Iops: The number of IOPS (only forgp2andio1volumes). -
SnapshotId: The ID of the snapshot from which the volume is created. -
CreateTime: The date and time of creation of the volume. -
Size: The size of the volume (in GiB).
{
"AvailabilityZone": "eu-west-2a",
"Tags": [],
"VolumeType": "standard",
"VolumeId": "vol-12345678",
"State": "creating",
"SnapshotId": null,
"CreateTime": "2016-02-05T13:34:45.894Z",
"Size": 50
}
The volume is created.
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.