● data-smb-qnap_download.mount - QNAP SMB download share
Loaded: bad-setting (Reason: Unit data-smb-qnap_download.mount has a bad unit file setting.)
Active: inactive (dead)
Where: /data/smb/qnap_download/ # unit file name data-smb-video.mount
What: //xxxx/Download
Mär 20 14:35:04 xxxx systemd[1]: data-smb-qnap_download.mount: Where= setting doesn’t match unit name. Refusing.
(tried with and without trailing slash on the where path)
/data/backup must be data-backup.mount (no trailing slashes)
If you change the unit file on-the-fly you need to reload
# systemctl daemon-reload
In your case
create the failure - it should be
/data/smb/qnap_download
Example with underscore
➜ system cat data-smb-qnap_download.mount
[Unit]
Description=Mount test qnap download storage partition
[Mount]
What=/dev/disk/by-uuid/4c580110-ba45-47a9-9578-04ab95ad9ec3
Where=/data/smb/qnap_download
Type=ext4
Options=defaults,rw,noatime
[Install]
WantedBy=multi-user.target
➜ system sudo systemctl start data-smb-qnap_download.mount
➜ system sudo systemctl status data-smb-qnap_download.mount
● data-smb-qnap_download.mount - Mount test qnap download storage partition
Loaded: loaded (/etc/systemd/system/data-smb-qnap_download.mount; disabled; vendor preset: disabled)
Active: active (mounted) since Sat 2021-03-20 15:21:11 CET; 1min 6s ago
Where: /data/smb/qnap_download
What: /dev/sdb2
Tasks: 0 (limit: 77017)
Memory: 4.0K
CGroup: /system.slice/data-smb-qnap_download.mount
Mar 20 15:21:11 ts systemd[1]: Mounting Mount test qnap download storage partition...
Mar 20 15:21:11 ts systemd[1]: Mounted Mount test qnap download storage partition.
Thx for your fast reply. But I don’t see the failure. As mentioned I had the where path initially without the trailing slash. With same result. I added the first line with cat... (thougH I don’t know what this does as in your guides template it’s not in there). Did a restart of systemctl daemon, too.
My file named data-smb-qnap_download.mount content:
● data-smb-qnap_download.mount - QNAP SMB download share
Loaded: bad-setting (Reason: Unit data-smb-qnap_download.mount has a bad unit file setting.)
Active: inactive (dead)
Where: /data/smb/qnap_download # unit file name data-smb-video.mount
What: //xxxxx/Download
Mär 20 15:44:01 xxxxx systemd[1]: /etc/systemd/system/data-smb-qnap_download.mount:1: Assignment outside of section. Ignoring.
Mär 20 15:44:01 xxxx systemd[1]: data-smb-qnap_download.mount: Where= setting doesn’t match unit name. Refusing.
“New” error in first line is due to the newly added first cat… line I guess.
Oh wow. I needed to remove the comment in the where line…
Now the assignment error is still present but it mounts. Commented the first cat… line removes that “yellow error”. But my mount is empty. :-/
Makes sense. As you mention it I remember it. But maybe I’m not the only “beginner”/mainly gui user who is not aware of this?! Copyying it from a template not knowing this.
I did a rm -r earlier on a test mount to /mnt/QNAP-Download. I guess that deleted the files?!
I just wanted to delete the folder - not the (my guess) already mounted content. :-/
So with automount it will not be visible in programs unless they access it? Goal for me is to have this path available so that whenever I need to access it from within a program it is there.
And when/from what does that automount get triggered?
I’ve set up everything now. Started .mount once. Stopped. Started .automount. After this I saw the mount in Dolphin appearing. I then started my application (lbry client) selecting the mount point as the download path. Worked. Did a system restart → lbry doesn’t start anymore; mount appears not inside Dolphin. systemctl status show both .mount/.automount inactive.
It’s a bad practice manually configuring/editing (auto)mount entries, the only thing you’ll need to do is creating a new entry in /etc/fstab with the x-systemd.automount parameter ;and afterwards test it if it mounts correctly.
Every (re)boot the corresponding .automount services will startup automatically by systemd checking your /etc/fstab .
So for the topic starter,
for example in /etc/fstab create an entry like: