Block storage volumes are network-based block devices that provide additional data storage for Droplets. You can move them between Droplets and resize them at any time.
Unmounting a volume makes its filesystem inaccessible to its Droplet’s operating system. This means the OS can’t write to or read from the volume. You should unmount volumes before resizing or detaching them to protect data integrity.
There are three steps to unmounting a volume:
Get the volume’s mount point with
df if you don’t already know it:
sudo df --human-readable --print-type
The mount point will look like
Filesystem Type Size Used Avail Use% Mounted on . . . /dev/sda ext4 99G 60M 94G 1% /mnt/volume-sfo2-01 . . .
Make sure the volume isn’t in use. If you try to unmount a volume while it’s in use, you’ll get a
target is busy error, so check if any processes are using the mounted filesystem with
sudo lsof +f -- /mnt/use_your_mount_point
Stop any listed processes.
Unmount the volume with
sudo umount --verbose /mnt/use_your_mount_point
--verbose flag makes the command output
/mnt/your_mount_point unmounted when it executes successfully. Otherwise,
umount is silent on successful execution.
If you won’t reattach the volume in the future, you can do some additional cleanup:
/etc/fstab to remove any entries referencing the volume.
Delete the mount point:
sudo rmdir /mnt/use_your_mount_point