Page 1 of 1
Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Sunday 03 January 2021 9:52
by krizzz
Maybe someone here can help me with this. I am trying to mount my Mac HDD on a mount location on my Mac.
In My FSTAB I have the following entry
Code: Select all
//192.168.0.XX/Volumes/Data2TB-1/Backup/Images/Domoticz /mnt/backup/ cifs vers=1.0,user=XXX,password=XXX,x-systemd.automount 0 0
But when mounting
I receive the following error.
Code: Select all
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I know the location on the disk is right. I copied paste the location from the Mac.
Also the location on the Pi is correct with the correct reading and writing permissions
Code: Select all
pi@raspberrypi:/mnt $ ls -l
total 4
drwxrwxr-x 2 root root 4096 Jan 2 23:36 backup
So I am lost why I keep getting this error message. Someone here with an idea?
Verzonden vanaf mijn iPhone met Tapatalk
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Sunday 03 January 2021 12:10
by erem
try and remove the last slash from /mnt/backup
/
or you can try to mount the directory in you backup script like this
Code: Select all
sudo mount -t cifs //192.168.0.XX/Volumes/Data2TB-1/Backup/Images/Domoticz /mnt/backup -o username=XXX,password=XXX,vers=1.0
and sudo umount /mnt/backup after
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Friday 08 January 2021 23:40
by krizzz
erem wrote: ↑Sunday 03 January 2021 12:10
try and remove the last slash from /mnt/backup
/
or you can try to mount the directory in you backup script like this
Code: Select all
sudo mount -t cifs //192.168.0.XX/Volumes/Data2TB-1/Backup/Images/Domoticz /mnt/backup -o username=XXX,password=XXX,vers=1.0
and sudo umount /mnt/backup after
So first of all, thanks for the help! I tried your suggestion, bt received the following message:
Code: Select all
Couldn't chdir to /mnt/backup: No such device
That's strange, lets try to go to the directory:
Ok, the backup dir is there
gives me
Very very strange. So I thought I try and remove the dir and create new one:
Code: Select all
pi@raspberrypi:/mnt $ rmdir backup
rmdir: failed to remove 'backup': Permission denied
So there is something wrong with the permissions of the dir, maybe that we the issue in the first place. But now I am trying to remove the dir and it refuses
Code: Select all
pi@raspberrypi:/mnt $ rm -Rf backup
rm: cannot remove 'backup': Permission denied
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Saturday 09 January 2021 13:19
by MikeF
krizzz wrote: ↑Friday 08 January 2021 23:40
That's strange, lets try to go to the directory:
Ok, the backup dir is there
gives me
Are you sure /mnt/backup is actually a directory? (Could be why cd is giving an error). Try
and check.
Very very strange. So I thought I try and remove the dir and create new one:
Code: Select all
pi@raspberrypi:/mnt $ rmdir backup
rmdir: failed to remove 'backup': Permission denied
So there is something wrong with the permissions of the dir, maybe that we the issue in the first place. But now I am trying to remove the dir and it refuses
Code: Select all
pi@raspberrypi:/mnt $ rm -Rf backup
rm: cannot remove 'backup': Permission denied
You need to put sudo in front of your commands. Also, to create the directory from within /mnt, you'll need to do
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Saturday 09 January 2021 13:30
by erem
MikeF is right.
my /mnt dir looks like this
Code: Select all
pi@RPi-Rob-usb:/mnt $ ls -l
total 8
drwxr-xr-x 2 root root 4096 Apr 7 2020 NAS.MOUNTPOINT
drwxr-xr-x 2 root root 4096 Apr 10 2020 rob
pi@RPi-Rob-usb:/mnt $
so make sure you use sudo when trying to mount/umount.
and ls -l will show you the owner and rights. t is important the permissions are set correctly.
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Monday 11 January 2021 20:43
by krizzz
MikeF wrote: ↑Saturday 09 January 2021 13:19
krizzz wrote: ↑Friday 08 January 2021 23:40
That's strange, lets try to go to the directory:
Ok, the backup dir is there
gives me
Are you sure /mnt/backup is actually a directory? (Could be why cd is giving an error). Try
and check.
Very very strange. So I thought I try and remove the dir and create new one:
Code: Select all
pi@raspberrypi:/mnt $ rmdir backup
rmdir: failed to remove 'backup': Permission denied
So there is something wrong with the permissions of the dir, maybe that we the issue in the first place. But now I am trying to remove the dir and it refuses
Code: Select all
pi@raspberrypi:/mnt $ rm -Rf backup
rm: cannot remove 'backup': Permission denied
You need to put sudo in front of your commands. Also, to create the directory from within /mnt, you'll need to do
You are right, I tried with side, but nothing worked. To me now , it looks like a permission problem.
Code: Select all
pi@raspberrypi:/mnt $ ls -l
total 0
drwxr-xr-x 2 root root 0 Feb 14 2019 backup
There is one folder there, but the total says 0?
Also here when trying to remove with sudo, it doesn't work.
Code: Select all
pi@raspberrypi:/mnt $ sudo rmdir backup
rmdir: failed to remove 'backup': Device or resource busy
Re: Backup domoticz on Mac HDD through mount on Raspberry Pi
Posted: Tuesday 12 January 2021 12:58
by erem
Maybe there is a problem with your file system.
You can check live file systems in read-only mode with this:
if running from an SD card: e2fsck -vfn /dev/mmcblk0p2
or when running from usb e2fsck -vfn /dev/sda? (sda? is where the root partition is mounted
if this finds errors, force an fchk on reboot via
sudo touch /forcefsck
sudo reboot
After your system boots, check if the file still exists:
sudo ls /forcefsck
If it does, you may want to remove it in order to avoid fsck on every system boot.