Mounting a network folder

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
marmachine
Posts: 133
Joined: Saturday 26 March 2016 10:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Mounting a network folder

Post 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?
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Mounting a network folder

Post by freijn »

is there no logifle from the autobackup? Something must have failed , I suspect user rights...
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Mounting a network folder

Post by EddyG »

Isn't there anything in /var/log/syslog and/or dmesg that gives a hint?
Doler
Posts: 164
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: Mounting a network folder

Post by Doler »

Execute following to grant access:

Code: Select all

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target
Mark: Domoticz latest Beta on Virtual machine (Proxmox) running Debian Trixie - Z-Stick 7 - RFXCom - P1 - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (latest, docker) via python plugin - Zwave-js-ui (latest, docker) - dzVents - Nodered
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: Mounting a network folder

Post 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
Regards,

Rob
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Mounting a network folder

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest