Score:0

Mount not working with systemd (working with /etc/fstab)

fr flag
Oli

I have a working line in /etc/fstab for mounting a remote samba server

//192.168.1.11/wind  /media/fixe/wind         cifs noauto,user,username=XXX,password=YYY,rw  0 0 

But I would now use automount with systemd (I have other mounting with systemd to NAS synology who are working).

So I tried in mnt-fixe-wind.mount :

meloli@Asus-A17:/etc/systemd/system$ sudo nano mnt-fixe-wind.mount 


[Unit]
Description = My Share mount
Requires = dbus-org.freedesktop.nm-dispatcher.service
After = network-online.target
Wants = network-online.target

[Mount]
What = //192.168.1.11/wind
Where = /mnt/fixe/wind
Options = username=XXX,password=YYY,rw
Type = cifs
TimeoutSec = 30

[Install]
WantedBy = multi-user.target
                            

When trying sudo systemctl start mnt-fixe-wind.mount the output is

    meloli@Asus-A17:/etc/systemd/system$ journalctl -xe                               
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- L'unité (unit) NetworkManager-dispatcher.service a commencé à démarrer.
janv. 28 08:59:39 Asus-A17 mount[15436]: mount error(22): Invalid argument
janv. 28 08:59:39 Asus-A17 mount[15436]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
janv. 28 08:59:39 Asus-A17 systemd[1]: mnt-fixe.mount: Mount process exited, code=exited, status=32/n/a
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- An n/a= process belonging to unit mnt-fixe.mount has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 32.
janv. 28 08:59:39 Asus-A17 systemd[1]: mnt-fixe.mount: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit mnt-fixe.mount has entered the 'failed' state with result 'exit-code'.
janv. 28 08:59:39 Asus-A17 systemd[1]: Failed to mount My Share mount.
-- Subject: L'unité (unit) mnt-fixe.mount a échoué
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- L'unité (unit) mnt-fixe.mount a échoué, avec le résultat failed.
janv. 28 08:59:39 Asus-A17 systemd[1]: Dependency failed for My Share mount.
-- Subject: L'unité (unit) mnt-fixe-wind.mount a échoué
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- L'unité (unit) mnt-fixe-wind.mount a échoué, avec le résultat dependency.
janv. 28 08:59:39 Asus-A17 systemd[1]: mnt-fixe-wind.mount: Job mnt-fixe-wind.mount/start failed with result 'dependency'.
janv. 28 08:59:39 Asus-A17 kernel: CIFS: VFS: Malformed UNC in devname
janv. 28 08:59:39 Asus-A17 sudo[15431]: pam_unix(sudo:session): session closed for user root
janv. 28 08:59:39 Asus-A17 systemd[1]: Started Network Manager Script Dispatcher Service.
-- Subject: L'unité (unit) NetworkManager-dispatcher.service a terminé son démarrage
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- L'unité (unit) NetworkManager-dispatcher.service a terminé son démarrage, avec le résultat done.

Mountpoint is existing

meloli@Asus-A17:/etc/systemd/system$ cd /mnt/fixe/wind/
meloli@Asus-A17:/mnt/fixe/wind$ 

What is wrong ? Any idea ?

Thank you.

uz flag
Jos
Can you try this: add another option: `vers=1.0` or `vers=2.0` (or any of the versions mentioned in `man mount.cifs`)?
Oli avatar
fr flag
Oli
I tried with`vers=1.0`, `vers=2.0`,`vers=2.1` and `vers=3.0` and same error
nobody avatar
gh flag
Does the folder under /mnt exist?
Oli avatar
fr flag
Oli
Yes `meloli@Asus-A17:~$ cd /mnt/fixe/wind/` output `meloli@Asus-A17:/mnt/fixe/wind$`
Oli avatar
fr flag
Oli
I edit the log output because the output seems to be different today
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.