Question

How to remove default mountpoint from automatically created block storage?

Posted June 9, 2018 743 views
Ubuntu 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?

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.

2 answers

I ran:

umount /mnt/oldmountpoint
rmdir /mnt/oldmountpoint

but upon reboot, the old mount point directory reappears and mounts…

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!

Submit an Answer