0

I am running Ubuntu server 20.04 with docker compose and PhotoPrism. I have a directory in my home directory called Pictures I have been using fstab to mount network folders in the Pictures folder so PhotoPrism can access them. I have dozens of folders I eventually want to mount.

Specifically I was doing this in /etc/fstab. (using /040 for the spaces in the actual folder names):

/dev/disk/by-id/dm-uuid-LVM-tfJRQBcAfX0VGga307mApri9zeVLnHPeUmFzqEefVj0Dol2dniWzPlgcOxrIK81j / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/bce073ee-93d7-4a32-afc2-0e2121c06a55 /boot ext4 defaults 0 1
/swap.img       none    swap    sw      0       0

automount from synology box

192.168.1.60:/volume1/Hobbiton2-top /home/tomr54/Hobbiton2-top ntfs-3g nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0 192.168.1.60:/volume1/Hobbiton2-top/My\040Pictures/Alaska-2018 /home/tomr54/Pictures/Alaska-2018 ntfs-3g nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0 192.168.1.60:/volume1/Hobbiton2-top/My\040Pictures/Bob_Jackie_2003-2018 /home/tomr54/Pictures/Bob_Jackie nfs-3g nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0

This was working fine for several days. Then yesterday when I booted the system and it went into Emergency Mode and it would not boot. I tried a number of solutions but nothing worked until I commented out the three lines; then my system booted normally.

Is there a better way do this? Thanks.

Zanna
  • 70,465
  • Do you really want to allow execution of files? That is one of the weaknesses of NTFS. noexec Do not permit direct execution of any binaries on the mounted filesystem. For external devices, may also want to add the nofail option, so boot continues even when that device isn't available.The nofail option is best combined with the x-systemd.device-timeout option. https://askubuntu.com/questions/638985/how-to-configure-systemd-to-ignore-fstab-drive-mount-failures Also look at Either systemd-automount or autofs can be used for remote file systems. – oldfred Mar 05 '24 at 13:59
  • Thank you for the suggestions, I have added the noexec and the timeout. Is there a way to have all the options declared and then referred to? my list is getting long. – ubuntutom Mar 05 '24 at 18:39

2 Answers2

1

It seems that the mount type (3rd argument in each line) is wrong. It is not ntfs-3g. You made a typo on the 3rd line.

The mount type should be the protocol used by your server like nfs

Sophana
  • 11
1

I was able to resolve the issue with this: Solution from rushnash And by dropping the gid= entry in the fstab entry. So now it looks like this:

//192.168.1.60/Hobbiton2-top/My\040Pictures/Alaska-2018 /home/tomr54/Pictures/Alaska-2018 cifs credentials=/home/tomr54/.smbcredentials,uid=*my_user_id* 0 0