By skylarmt
I attached a block storage device using the new “Automatically Format and Mount” option. Now I’d like to move the mountpoint. I manually added it to /etc/fstab, and now it’s mounted at both /mnt/oldmountpoint and /var/lib/newmountpoint. How do I get rid of /mnt/oldmountpoint?
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!
I know this question is from 2018 but I thought I would leave instructions given to me by DO on how to solve this.
––
When a volume is auto-attached, a systemd mount file is created that is called during the boot process. This mounts the volume each time without affecting the fstab file. These steps should resolve the issue:
/etc/systemd/system/YOUR_MOUNT_NAME.mount (Make sure that the volume name matches and is correct! Be very careful with the “rm” command.)––
Hopefully this helps anyone searching for a resolution to this issue!
I ran:
umount /mnt/oldmountpoint
rmdir /mnt/oldmountpoint
but upon reboot, the old mount point directory reappears and mounts…
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.