systemd remote-fs.target trying to mount remote filesystem that has been removed from fstab

This is a CentOS 7 system

This actually starts with the kafka service. Kafka is failing to start due to a dependency on remote-fs.target

When I try to manually run remote-fs.target:

sudo systemctl start remote-fs.target
A dependency job for remote-fs.target failed. See 'journalctl -xe' for details.

So I run journalctl -xe, and get this:

Jun 09 15:33:10 lobo2 systemd[1]: Mounting /home/AAI33947/h...
-- Subject: Unit home-AAI33947-h.mount has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit home-AAI33947-h.mount has begun starting up.
Jun 09 15:33:10 lobo2 mount[118920]: error 2 (No such file or directory) opening credential file /home/AAI33947/.cifspwd
Jun 09 15:33:10 lobo2 systemd[1]: home-AAI33947-h.mount mount process exited, code=exited status=2
Jun 09 15:33:10 lobo2 systemd[1]: Failed to mount /home/AAI33947/h.
-- Subject: Unit home-AAI33947-h.mount has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit home-AAI33947-h.mount has failed.
-- 
-- The result is failed.
Jun 09 15:33:10 lobo2 systemd[1]: Dependency failed for Remote File Systems.
-- Subject: Unit remote-fs.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit remote-fs.target has failed.
-- 
-- The result is dependency.

So I go look in fstab and find that there is indeed a cifs mount command for /home/AAI33947/h

But that user is no longer with us, and the remote target for that mount and the local mount point no longer exist. So I removed that line from fstab

However, when I attempt to run remote-fs.target I still get the same error. It’s still trying to mount that remote filesystem, even though it isn’t in fstab anymore.

What’s going on? How can I get it to recognize that this remote filesystem is no longer a thing it needs to do?? I suppose a reboot would might do it, but I’m trying not to disrupt some other stuff going on at the moment.

Thanks!

Asked By: CoAstroGeek

||

If you are running systemd, it will create mount units from your /etc/fstab on boot. If your fstab changes, you need to run sudo systemctl daemon-reload to refresh these units. The command mount -a will actually show a warning about this if it’s run after a change to fstab without reloading the daemon.

Answered By: ajgringo619
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.