How to create multi-attach volume on AWS

From PKC
Jump to navigation Jump to search

Background

To implement the one of the required aspect of storage in cluster computing, in which the availability of the storage on the event of cluster failure, we need to setup some kind of storage outside the cluster itself. There are several options to achieve such configuration. On AWS Cloud system there are two options, which are EBS (Elastic Block Storage) and EFS (Elastic File Storage). Please refer to this link for further information on both specification.

On this documentation, we decided to implement EBS to mount it on all the nodes in the cluster.

Getting Started

Here, we are going to create a volume, configure it to enable the multi-attach, and attach it to three EC2 instances by using AWS Management Console. Then, from one instances, we are going to perform functional testing by writing simple text file from one instance and view it from another instance.

Let's begin,
Step One; navigate to the EC2 Dashboard and select Elastic Block Storage > Volume, from the left-hand menu.
Step Two; Select 'Create Volume' button on left top portion of the screen, below are the parameters that needs to be determine

  1. Volume Type; supported volume type for multi-attach is the provision io1 and provision 02, please see this link to have complete information of the volume type.
  2. Size; Type in the storage size
  3. Availability Zone; Ensure that the storage is the same zone with your EC2 instance
  4. Snapshot ID; you can input the available snapshot provide with AWS
  5. Encryption; enable or disable encryption
  6. Multi-Attach; ensure the multi-attach option is selected
  7. And ... add any tag as necessary.

Once the volume is created, one can review the result from Volume Description tab on EC2 > Elastic Block Storage > Volume menu, by clicking on newly created volume.

Step Three; Attach the volume to your EC2 Instances by clicking on the volume, and click on Action Button > Attach Volume. Here you will presented with the screen option to select your instances. And you can leave the Device to default. At this scenario, this step is repeated as many as instance number.

Detach Volumes

Conclusion