Good morning, My Dropet has a full disk, for this reason I need to attach a volume to it, as I already use the dropet to host websites, I want to install the volume in the same directory as my dropet, how can I do this whole process?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
What I would do is first mount the disk to a temporary directory, then by using the rsync or the cp command I would copy the files from the current directory to the volume.
Once the files are in place, I would remove the existing directory from the root partition, and then I would mount a volume to that specific directory path instead.
You could run the following command:
sudo mount -o defaults,nofail,discard,noatime /dev/disk/by-id/scsi-example /var/www/your_site/example_mount_point
This is from the documentation here:
https://docs.digitalocean.com/products/volumes/how-to/mount/
Let me know if you have any questions! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.