Will Storage Volume be formatted if we resize a Droplet?

Posted July 3, 2020 700 views
DigitalOcean Volumes

I have a Droplet with a Volume attached. I poweroff the Droplet and Resize (CPU and RAM only).

Once the resize is completed, I power on the Droplet.

I noticed the Volume is not attached, so I followed the Config instructions:

  1. - mkdir -p /mnt/volume_
  2. - mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DOVolumevolume-sgp1-01 /mnt/volume
  3. echo ’/dev/disk/by-id/scsi-0DOVolumevolume /mnt/volume_ ext4 defaults,nofail,discard 0 0’ | sudo tee -a /etc/fstab

Once the Volume is attached to the Droplet, I check the Volume directory and all the folders/files is gone. The volume available space also showed 99% available.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hello, @sq

Volumes are auto-mounted into the /mnt directory with the options defaults,nofail,discard,noatime. If the volume was detached or simply not mounted after the reboot the data should still be present on the droplet.

Detaching a volume removes the volume from its current Droplet. You can attach the volume and all of its contents to a different Droplet as needed. Or attach it back to the same droplet.

Before detaching a volume, unmount it to avoid data loss.

Hope that helps!


Hi @alexdo

Thanks for your reply. I didn’t detach the volume before I poweroff the Droplet and Resize it. After the Droplet was Resize, I attach the volume back to the Droplet, but the data in the volume is missing.

Should I detach the volume and mount it back to see if the data can be seen again?

  • As per Alexdo’s comment if you didn’t detach it then it is very likely the data has been lost.

    Did you take a snapshot (backup) of your volume before re-sizing? You may be able to restore it if you have a snapshot.

That’s terrible to know that if I didn’t detached I would suffer data lost. There’s no warning whatsoever to the user. My assumption to keep it separate to the droplet to be more reliable. It looks like if the droplet was accidentally power-off or restarted it can impact all your data in a spaces volume.

Really losing confidence in DO.

I did take a snapshot after, and it still shows there is data in the volume (100GB), but after recovery I only see (60 MB)

  • Keep everything as it is, you may need to reach out to support and see how you can retrieve that 100GB if you’re still able to see it.