Volume Quickstart

To follow along, you will need a DigitalOcean account. If you don’t already have one, you can register on the sign up page.

Create and Attach a New Volume

You can create and attach a new volume to an existing Droplet or while creating a new Droplet. The Droplet and volume must be in the same region.

  1. From the Create menu in the top right of the control panel, click Volumes, then choose an existing Droplet to attach the volume to in Select Droplet to attach to.

    Alternatively, on the Droplet create page, in the Add block storage section, click Add Volume.

  2. Choose the size of your volume, which can be from 1 GB to 16 TB (16,000 GB).

  3. Choose whether you want to mount the volume automatically or manually.

To mount manually, follow the instructions in the volume’s More menu, under Config instructions. Automatic mounting runs the same commands and options provided for manual formatting and mounting, and can be a more convenient option when it’s available.

By default, both mounting options:

  • Format the volume with the Ext4 filesystem,
  • Mount the volume into the /mnt directory with the options defaults,nofail,discard,noatime, and
  • Update fstab to ensure the volume will be re-mounted after reboots.

Detach a Volume

Detaching a volume removes the volume from its current Droplet. The volume and all of its contents can later be attached to a different Droplet as needed.

To detach a volume:

  1. Make sure the volume is not being written to by unmounting it (umount /mnt/your_mount_point) or powering down the Droplet.
  2. On the account-level Volumes page or the Volumes page for an individual Droplet, open the volume’s More menu and choose Detach.

Reattaching an Existing Volume

You can move volumes between Droplets by detaching the volume from the first Droplet and reattaching it to another Droplet in the same region.

To attach an existing unattached volume to an existing Droplet in the same datacenter:

  1. Navigate to the account-level Volumes page.
  2. Next to the volume you want to use, choose Attach a Droplet.

To attach an existing unattached volume to a new Droplet during creation:

  1. On the Droplet create page, in the Add block storage section, click Attach existing.
  2. Click the volume you want to attach to highlight it, then complete the Droplet creation.

You’ll need to mount the volume again by following the instructions in the volume’s More menu, under Config instructions.

Resize a Volume

To increase the size of your volume:

  1. Detach the volume.
  2. From the volume’s More menu, choose Resize Volume.
  3. Enter a new size in GB, then click Resize Volume.
  4. If your volume is unpartitioned, expand the filesystem with resize2fs for Ext4 and xfs_growfs for XFS. If your volume is partitioned, you will need to resize the partition before expanding the filesystem.

Detailed instructions are available in the manual mounting, formatting, and partitioning how-to.

Decreasing the size of a volume is not possible due to the high risk of data loss or corruption.

Delete a Volume

Deleting a volume permanently and irreversibly destroys the volume and its contents.

To delete a volume, on the account-level Volumes page or the Volumes page for an individual Droplet, open the volume’s More menu and choose Delete.