Attaching a Volume
You attach a volume to a Compute Cloud@Customer instance to expand the available storage on the instance.
You can attach volumes to more than one instance at a time, see Attaching a Volume to Multiple Instances.
You can also attach a boot volume that has been detached from its instance to a different instance as a data volume. This operation is convenient for troubleshooting a boot volume and for performing administrative operations while the boot volume is detached from its instance.
Only attach Linux volumes to Linux instances and Microsoft Windows volumes to Microsoft Windows instances.
If you are reattaching a volume that was detached, the volume might be associated with a different device name, and the instance operating system might not recognize the volume.
-
In the Compute Cloud@Customer Console navigation menu, click Compute, then click Instances.
-
Select the compartment where the instance resides.
-
In the Instances list, click the instance that you want to attach a volume to.
-
Under Resources, select Attached Block Volumes.
-
In the Attached Block Volumes panel, click Attach Block Volume.
-
Enter the following information:
-
Select the compartment where the block volume resides.
-
Select a Block Volume.
-
Select one of the following access modes:
-
Read/Write: (Default) Configures the volume attachment with read/write capabilities. The volume cannot be shared with other instances. This option enables attachment to a single instance only.
-
Read/Write - Shareable: Configures the volume attachment as read/write, shareable with other instances. This option enables read/write attachment to multiple instances.
-
Read-Only - Shareable: Configures the volume attachment as read-only, enabling attachment to multiple instances.
-
-
-
Click Attach to Instance.
-
Use the oci compute boot-volume-attachment attach command and required parameters to attach a boot volume to an instance.
oci compute volume-attachment attach --instance-id instance_OCID \ --volume-id volume_OCID --type paravirtualizedS]
Note
The
--is-shareable
option is required to attach a shareable volume. The default value of this option isfalse
.--is-shareable true
For a complete list of CLI commands, flags, and options, see the Command Line Reference.
This task is not available in the API.
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.