this post was submitted on 19 May 2026
35 points (94.9% liked)
Selfhosted
60024 readers
924 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam.
-
Posts here are to be centered around self-hosting. Please ensure it is clear in your post how it relates to self-hosting.
-
Don't duplicate the full text of your blog or git here. Just post the link for folks to click.
-
Submission headline should match the article title.
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I had one back in the day like that. My notes on that event are old so maybe someone can modify or clarify.
First you'll have to find the UUID of the external drive. (
lsblk -f) Then create a mount file like:sudo nano /etc/systemd/system/mnt-data.mount. In themnt-data.mountfile, insert something like:Enable and reload:
Verify status:
systemctl status mnt-data.mountShould say 'active'. Reboot and test. Let me know if that works. Like I said, that was a while ago. If it works, it's just another reason why you should doccument your server setups. If it doesn't, well shucks I tried. LOL
This but put the entries in /etc/fstab instead.
Wouldn't that just mount the HDD when the server boots? I think the issue is re-mounting it while the server remains up, hence the systemd service. But maybe I don't understand fstab fully.
I wanted to provide feedback for THIS part only. :) not for OPs issue. I would have responded to OPs post if that were the case....
I think you can use the service to remount using the fstab entries/options. (Like "mount /dev/disk/by-uuid/XXX" and it'll automatically apply the options and mountpoint)
Arguably cleaner depending on your setup
I'll make an addenda to my notes. Thanks.
TIL about systemd mounts, thanks!
My /etc/fstab file currently has the following:
UUID=412ea77a-96e1-427c-9f75-2aae2fe0dca1 /mnt/wd ext4 defaults 0 2If I were to use the
mnt-data.mountyou've suggested, does that mean I need to delete what I already have in /etc/fstab and replace it with what you suggested?