Page 1 of 1

Mounting a network folder

Posted: Monday 13 April 2020 8:53
by marmachine
Hi guys,

As i installed RaspiBackup, i'd like to mount a specific folder from my (Synology) NAS as a local folder

Found anough to read about that on Google, it shows that many experience issues with setting up, and so do i, but my answer isn't there :?

What i did:
created a backup folder

Code: Select all

sudo mkdir /backup
commandline test seems succesfull

Code: Select all

sudo mount -t cifs //192.168.2.250/backup/RaspiBackup_save /backup -o username="user",pass="login",vers=1.0
now to make sure it mounts after boot

Code: Select all

sudo nano /etc/fstab
added the following to fstab

Code: Select all

//192.168.2.250/backup/RaspiBackup_save /backup cifs comment=systemd.automount,defaults,rw, username="user",pass="login",vers=1.0,uid=1000, gid=46 0 0
After boot i can navigate to the backup folder, but it doesn't show the files. :(
With the manual command it works... what's wrong here?

Re: Mounting a network folder

Posted: Monday 13 April 2020 11:28
by freijn
is there no logifle from the autobackup? Something must have failed , I suspect user rights...

Re: Mounting a network folder

Posted: Monday 13 April 2020 11:41
by EddyG
Isn't there anything in /var/log/syslog and/or dmesg that gives a hint?

Re: Mounting a network folder

Posted: Monday 13 April 2020 11:45
by Doler
Execute following to grant access:

Code: Select all

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

Re: Mounting a network folder

Posted: Monday 13 April 2020 18:08
by erem
if the manual mount works, then the issue must be in your fstab entry.
try
sudo mount -av

that should spit out an error

Re: Mounting a network folder

Posted: Tuesday 14 April 2020 9:20
by EddyG
B.t.w. What I do in every 'backup' or other script that I use is:
1. mount remote
2. do stuff
3. unmount remote

For every script I use a different mountpoint, so they can run independently.
This way you can check for problems on the remote and act accordingly.
And after some years of using cifs and nfs next to each other, I choose only to use nfs.

This is what man mount state for the -a option:
Note that it is a bad practice to use mount -a for fstab checking. The recommended solution is findmnt