You are not logged in.
Every time I reboot or shut down my computer, I get this error:
[FAILED] Failed unmounting /run/media/SSD.I keep Docker's data under /run/media/SSD/docker. The problem seems to be that the docker service is not stopped until /run/media/SSD is unmounted.
When I run sudo systemctl stop docker before shutting down, I don't get that error. So I'm sure it has to do with docker's not being stopped in time.
How do I stop docker just before my SSD is unmounted?
Offline
find your mount target for "/run/meda/SSD" using:
systemctl list-units |grep /run/media/SSDwill be somthing like 'run-media-SSD.mount'
then create a drop in file for docker.service
systemctl edit docker.serviceand add the .mount target to After and BindsTo
should look somthing like this:
### Editing /etc/systemd/system/docker.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
BindsTo=run-media-SSD.mount
After=network-online.target docker.socket firewalld.service run-media-SSD.mount
### Lines below this comment will be discarded
...........then reload systemd daemon:
systemd daemon-reloadand that SHOULD work, i havent tested it tho
Offline
It worked!! Thank you so much ![]()
My drop-in file:
[Unit]
BindsTo=run-media-henriq-SSD.mount
After=network-online.target docker.socket firewalld.service run-media-henriq-SSD.mountOffline