In this how-to guide, you will learn how to modify an EBS volume type, which we will demonstrate by upgrading an attached magnetic EBS volume to a PIOPS/General Purpose SSD EBS volume.
An Example Use Case
A news website is running their complete stack on Amazon Web Services (AWS) where all the news content is stored on magnetic EBS volumes. As they grow, they witness performance issues with their websites. On performing further analysis, they figured out the performance of their magnetic EBS volume is getting throttled around 200 IOPS and throughput is reaching the maximum capacity of 90MBps. In order to enhance system performance, they decided to move to General Purpose SSD volumes, which can offer up to 10,000 IOPS per volume and a max throughput of 160MBps. An additional advantage they found by moving to General Purpose SSDs is that it they offer upto 16TB of volume, compared to Magnetic volumes’ 1TB.Environment Details
- Region: US-East (Northern Virginia)
- Operating System: Linux and Windows
Step by Step
1. Identify the magnetic EBS volume attached to your instance
In order to identify the magnetic disk attached EBS volume, look at the instance details for block devices. When you click on the block device section, you might see: /dev/sda, /dev/sdf, /dev/xvda, or something along those lines. If you click on /dev/xvda, it will highlight the EBS volume that is attached to your instance. In most cases, /dev/sda or /dev/xvda denotes the root volume of your instance.2. Create a snapshot of your EBS volume
In order to create a snapshot of your EBS volume, right click on your EBS volume and click on ‘Create Snapshot’. It is usually recommended to stop the instance before the snapshot creation process begins in order to ensure data consistency. EBS snapshots can be easily managed and automated with CPM. If you are creating a snapshot of an additionally attached EBS volume (apart from the root volume), the volume can be unmounted and you can trigger the snapshot creation process.3. Track the progress of your EBS snapshot
To track the progress of your EBS snapshot creation, navigate to the snapshot section of the EC2 services page and select your snapshot ID.4. Create a new PIOPS/General Purpose SSD volume from your EBS snapshot
You can create a new General Purpose EBS SSD volume or PIOPS EBS SSD Volume from your EBS snapshot. Simply right click on your EBS snapshot and select ‘Create Volume’.5. Detaching an existing attached magnetic volume from the instance
In order to detach an existing attached magnetic volume from an instance, go to your original magnetic volume and right-click on it. Select ‘Detach Volume’. Note 1: Before detaching the volume, your instance should be in a stopped state. This will ensure that no application is accessing or writing on that volume. Incase, you don’t want to stop the instance, you can go-ahead and unmount the volume from the instance. Note 2: Please refer to the attachment information for this volume. This will be required when you attach a new volume on the same device, like /dev/xvda, /dev/sdf, etc.6. Attach a new PIOPS/General Purpose SSD volume
To attach a new PIOPS/General Purpose SSD volume, select and right click on the new volume. Select ‘Attach Volume’.- Instance ID: The instance to which the volume should be attached.
- Device: The attachment point for this EBS volume. This should be the same as the magnetic volume. In this case, it is /dev/xvda.