Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

mount smb share in fstab fails

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

mount smb share in fstab fails

#1 Post by peer »

I am trying to mount an SMBshare in a qemu/kvm guest.
host os: Debian 11 Kde Plasma
guest os: Debian 11 Lxde minimal
cifs-utils is installed.
I am able to mount the share in the terminal:

Code: Select all

$ sudo mount -t cifs -o credentials=/root/smbpass //192.168.178.10/windows-share /mnt/windows-share 
So I know that mounting works. I added the following line to /etc/fstab:

Code: Select all

//192.168.192.10/windows-share /mnt/windows-share cifs credentials=/root/smbpass	0	0  
But after reboot the share is not mounted.
When I try to mount it manually in the terminal I get an error:

Code: Select all

$ sudo mount /mnt/windows-share
[sudo] password for peer: 
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
I am doing something wrong but I cannot find what. Google does not help.
What am I doing wrong?????

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: mount smb share in fstab fails

#2 Post by peer »

I tried a laptop (192.168.178.30) in the same subnetwork as my host (192.168.178.10). And the fsab worked on my laptop.
The ip of the guest is 192.168.122.107 (but it is not static). So this could be a problem.
But when the guest is running I am able to ping the host and mount the share manually

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: mount smb share in fstab fails

#3 Post by peer »

I have made some progress with the command ip route:

Code: Select all

$ ip route
default via 192.168.122.1 dev enp1s0 
192.168.122.0/24 dev enp1s0 proto kernel scope link src 192.168.122.107
I changed the IP adress in fstab from 192.168.178.10 to 192.168.122.1

Code: Select all

//192.168.122.1/windows-share /mnt/windows-share cifs credentials=/root/smbpass  0       0
Now the share is not automatically mounted at boot but I can manually mount it with:

Code: Select all

sudo mount /mnt/windows-share
I still have to search for the option to automatically mount the share Adding the option 'auto' did not work

peer
Posts: 443
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 20 times

Re: mount smb share in fstab fails

#4 Post by peer »

When I look in the file /var/log/syslog I see the following error:

Code: Select all

error 2 (No such file or directory) opening credential file /smbpass   
I do not understand this. The file is /root/smbpass and works when I mount manually
I guess this error has to do with the line before this one. There I read:

Code: Select all

Mounting /mnt/windows-share...  
I think that fstab here looks for //192.168.122.1/windows-share where it should look for //192.168.178.10/windows-share. It seems as if the system does not know yet that 192.168.178.1 is forwarded to 192.168.178.10.

This is becoming to difficult for me.At this moment I mount the share in a script that runs at boot. But I still look for an answer

Post Reply