Question

Will Storage Volume be formatted if we resize a Droplet?

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:

    • mkdir -p /mnt/volume_
    • mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /mnt/volume
  1. echo ‘/dev/disk/by-id/scsi-0DO_Volume_volume /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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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)

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?

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!

Regards, Alex