You are not logged in.

#1 2020-09-28 00:04:04

Inotamira
Member
Registered: 2020-09-16
Posts: 10

[Solved] CIFS always requires mount -a after reboot

I currently have a home NAS configured. Everything is working, except, anytime I have to reboot my machine, I have to issue a mount -a to get it to remount correctly. I have tried using the hard switch for cifs, I have tried using x-systemd flags, and the error always returns with "An error occurred while accessing 'Inos-Drive', the system responded: mount.cifs: permission denied: no match for /home/inotamira/Storage/Inos-Drive found in /etc/fstab"

The fstab entry in question reads as

 //192.168.1.100/NAS/ /home/inotamira/Storage/Inos-Drive/ cifs nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Inos-Drive,credentials=/home/inotamira/.smb/NAS,x-systemd.requires-mounts-for=/home 0 5 

It SHOULD be waiting for the home directory, which seems to be the issue as far as I can tell, it's not mounting home before it's trying to mount the cifs before it mounts the home directory which is on another partition. if not, I'm not sure where I'm getting things confused. I will fully admit I only vaguely understand how fstab entries work, and I have tried looking at the documentation, but I don't fully understand all of it because fstab just confuses me over all.

Last edited by Inotamira (2020-09-28 01:15:42)

Offline

#2 2020-09-28 00:52:02

solskog
Member
Registered: 2020-09-05
Posts: 246

Re: [Solved] CIFS always requires mount -a after reboot

How about these output direct after reboot?

# cat /proc/mounts
# mount -a
# journalctl -b

Last edited by solskog (2020-09-28 00:52:31)

Offline

#3 2020-09-28 01:15:25

Inotamira
Member
Registered: 2020-09-16
Posts: 10

Re: [Solved] CIFS always requires mount -a after reboot

solskog wrote:

How about these output direct after reboot?

# cat /proc/mounts
# mount -a
# journalctl -b

Well, funny thing, I made a quick edit changing nofail to noperm, and everything now mounts as intended. I don't know why that ones needed, I just noticed it was in a lot of the guides I was reading. So apparently I'm just stupid.

Offline

#4 2020-09-28 02:15:03

solskog
Member
Registered: 2020-09-05
Posts: 246

Re: [Solved] CIFS always requires mount -a after reboot

Not a bump but for the record:

I wouldn't remove 'nofail' option, since if the NAS wasn't available during the client boottime, the boot process will stop and require root user access.

On the other hand '_netdev' option is useful for client until network comes up.
'x-systemd.requires-mounts-for' option may only be useful if all the following options are included:
noauto,x-systemd.automount,x-systemd.requires-mounts-for

Offline

Board footer

Powered by FluxBB