How to Use the Scratch Disk on GPU Droplets

DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.


GPU Droplets come with two different kinds of storage:

  • Boot disk: A local, persistent disk on the Droplet to store data for software like the operating system and ML frameworks. This is the same as the disk on a non-GPU Droplet.

  • Scratch disk: A local, non-persistent disk to store data for staging purposes, like inference and training. Non-GPU Droplets do not have a scratch disk.

Configure Automatic Mounting

The scratch disk that comes with a GPU Droplet is pre-formatted with a single ext4 GPT partition, but it is not automatically mounted.

To configure automatic mounting, create a mount point directory (like /scratch), then add the following configuration to /etc/fstab:

LABEL=DOSCRATCH	/scratch	ext4	discard,errors=remount-ro	0 1

Replace /scratch with the mount point directory you chose.

Warning

Data on the scratch disk is not persistent. This data is lost when you power down the GPU Droplet, including during resizes. The scratch disk also has no redundancy, so a hardware failure may lead to loss of data.

We strongly recommend storing data you want to keep on the boot disk, and using the scratch disk for ephemeral data as intended.

Our existing documentation for working with block storage volumes can be helpful for reformatting and partitioning, expanding partitions, and mounting the scratch disk as well.