API v2 Changelog

< Back to Changelog

Block Storage Volumes Now Support Automatic Filesystem Formatting

Date: May 22, 2018

Tagged In: API v2

Author Andrew Starr-Bochicchio

The /v2/volumes endpoint has been updated to support automatically formatting the filesystem of newly created Block Storage volumes. Volume resources now expose two new attributes: filesystem_type and filesystem_label. They can be used to specify the filesystem and the label to be applied. Currently, the available filesytem types are ext4 and xfs.

For example, here is a request creating a new volume formatted with an EXT4 filesystem:

  curl -X POST \
    -d '{"name":"volume-nyc3-01","region":"nyc3","filesystem_type":"ext4","filesystem_label":"example","size_gigabytes": 100}' \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
    https://api.digitalocean.com/v2/volumes

Additionally, Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 will now automatically mount volumes with pre-formatted filesystems when attached. Attaching pre-formatted volumes to other Droplets is not recommended. When the filesystem_type attribute is not provided, volumes will continue to be presented as raw block devices and require additional configuration.

When retrieving an existing Block Storage volume, filesystem_type and filesystem_label will reflect the current filesystem and label used on the volume even if these were applied manually.

For more information, see the full API documentation for Block Storage Volumes.