Extend a Root Volume

The root volume contains the OS that boots the instance. Because the root volume cannot be detached from an instance, extending a root volume requires deleting the instance, extending the root volume, and recreating a new instance using the extended root volume.

If your instance does not use a floating IP address on a private network, the new instance with extended root volume will have a new IP address.

  1. Identify Root Volume: Click on the name of the instance on the Instances screen. Under the Overview tab, scroll all the way down to the bottom to the Volumes Attached section. Your Root volume is the volume attached on /dev/sda. Click on the volume's name or UUID.

  2. Rename Root Volume: Make sure to rename the root volume so it can be easily identified later.

  3. Take a Snapshot of the Root Volume: Take a snapshot of the root volume as a backup and prevent the root volume from being deleted when you delete the instance.

  4. Prepare the Instance: Log into the instance and run the sudo cloud-init clean command. This will clear the cloud-init cache so it will re-run to configure the new instance.

  5. Delete the Instance: Delete the instance and the root volume will become detached (i.e. available status).

  6. Extend the Root Volume: Extend the root volume to your desired size.

  7. Create a New Instance: Create a new instance using the extended root volume.

  8. Verify: After the new instance is up and running, log in to verify the extended / file system using the df command.

  9. Clean Up: Delete the root volume snapshot created above.