Binding a drive that is mounted to /run on boot


First of all, apologies if this is in the wrong section. I’m not sure where to put drive-related topics.

I’ve been trying to bind a a folder from a drive that gets mounted to /run on boot. To bind it, I created a systemd service that executes mount --bind /run/media/user/Space/Movies /mnt/Movies. I also specified that the service should be run after the /run/media/user/Space drive gets mounted by adding both After=run-media-user-Space.mount and Requires=run-media-user-Space.mount to the service. Unfortunately when I boot my computer, I get an error that states:

mount: /mnt/Movies: special device /run/media/user/Space/Movies does not exist.

which I’m guessing is due to the mounting process for Space not completing before the bind service runs. If I run the service after the computer boots, the folder gets bound to /mnt/Movies without a problem.

Is there a special parameter I need to add to ensure that a drive is properly mounted before the binding service can run?


Thanks for the post. It seems like most of the content is about mounting but are there similar methods for performing binding mounts like this?

Not a direct reply to your question, but the post below contains information regarding where and how to statically mount additional drives, so it may help you on your way. :arrow_down:


Thanks for the link. I’ve been trying to find a way to do this without statically mounting the original drives because I have a lot of programs pointing to the current location. Looks like I might just have to bite the bullet and do it though.