You are not logged in.
I mounted some cifs mount in the /etc/fstab:
//<ip>/home /mounts/<user> cifs user,credentials=/etc/cifs-credentials/<user>,uid=<user>,gid=<user>,_netdev,x-systemd.requires=graphical.target,noauto,x-gvfs-name=<user>
Every time I shutdown it waits with the following message:
(1 of 2) A stop job is running for /mounts/<user> (25s / 1min 33s)
I found out that the network is stopped before and that this is probably why it can't unmount. If I unmount all shares manually before shutdown, I don't need to wait.
Then I tried to add a systemd service to force unmount before network goes down:
# cat /etc/systemd/system/unmount-cifs-before-shutdown.service
[Unit]
Description=Unmount all cifs mounts before network down on shutdown
Requires=network-online.target
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/usr/bin/umount -t cifs -all --force --lazy
[Install]
WantedBy=multi-user.target
Unfortunately without success. Any recommendations?
Offline
This has nothing to do w/ the shutdown, you need to umount the shares before you lose the network, see eg. https://wiki.archlinux.org/title/Samba# … c_mounting
The best approach is to hook up w/ your network managing service, they pretty much all provide soem sort of take-down hook.
Offline
Same issue here. I am interested in how to accomplish what seth is proposing.
EDIT: I found a solution. In KDE Plasma, I checked the box "All users may connect to this network" under General Configuration. My assumption is the root user couldn't connect in order to unmount the shares during poweroff/reboot.
Last edited by phonemic (2024-06-09 13:36:17)
Offline
Depends on what you use to configure your network, for NM see https://wiki.archlinux.org/title/Networ … SMB_shares
Offline