Question

How to remove default mountpoint from automatically created block storage?

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?


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:

  1. Take a Snapshot of both the Droplet and the Volume for safety.
  2. Unmount the old mount point.
  3. Remove the systemd mount file that should be found at: /etc/systemd/system/YOUR_MOUNT_NAME.mount (Make sure that the volume name matches and is correct! Be very careful with the “rm” command.)
  4. You can test by rebooting at your earliest convenience and checking with the “mount” command.
  5. If everything is working well, feel free to remove the Snapshots created at the start.

––

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…