[SOLVED] Cannot mount CIFS on Proxmox 6

Razva

Renowned Member
Dec 3, 2013
252
10
83
Romania
cncted.com
Hey,

We have a fully functional CIFS share that is working properly on Proxmox 5. Just for the sake of testing, we've tried to remove it and re-add it again:

Code:
root@pmx5:~# pveversion
pve-manager/5.4-5/c6fdb264 (running kernel: 4.15.18-13-pve)

root@pmx5:~# pvesm add cifs test1 --server myserver --share myshare --username myuser --password mypassword --smbversion 3.0

root@pmx5:~# pvesm statusName                Type     Status           Total            Used       Available        %
local                dir   disabled               0               0               0      N/A
test1               cifs     active      5242880000      4276579759       966300241   81.57%
zfs              zfspool     active       417042164       184429396       232612768   44.22%

The CIFS is successfully mounted and is fully functional. We've tried this on 3 Proxmox5 servers, works on all.

Now we're trying exactly the same command on a fresh-install Proxmox 6 machine.

Code:
root@pmx6:~# pveversion
pve-manager/6.0-4/2a719255 (running kernel: 5.0.15-1-pve)

root@pmx6:~# pvesm add cifs test1 --server myserver --share myshare --username myuser --password mypassword --smbversion 3.0

mount error(2): No such file or directory
create storage failed: error with cfs lock 'file-storage_cfg': mount error: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

It fails. Yes, we've tried it with --smbversion 2.0 and --smbversion 2.1 as well, it's the same result.

There are no networking/firewall limitations, as this exact box was running Proxmox5 just fine, with the share mounted.

Any hints?

Thank you,
Razva
 
Do you see anything in the logs ? (`dmesg` , `journalctl -r`) when you try to mount the share in PVE 6.0?
 
Do you see anything in the logs ? (`dmesg` , `journalctl -r`) when you try to mount the share in PVE 6.0?
Here's dmesg:

Code:
CIFS VFS: cifs_mount failed w/return code = -2

journalctl -r doesn't post anything during the error.

If required I can provide shell access, it's a fresh box we've setup as POC before upgrading our clusters to PVE 6, so there's no sensitive information on it.
 
Last edited:
Later edit:

This is working:
Code:
smbclient //uXXX-sub2.your-storagebox.de/uXXX-sub2 -d 0 -m smb3 -U uXXX-sub2 -c 'l'
Enter WORKGROUP\uXXX-sub2's password:
  .                                   D        0  Fri Aug 16 08:58:25 2019
  ..                                  D        0  Fri May  3 17:02:31 2019
  dump                                D        0  Thu Aug 15 12:16:56 2019
  images                              D        0  Fri Aug 16 08:58:25 2019
  snippets                            D        0  Fri Aug 16 08:50:16 2019

This is failing on PVE 6 (working on PVE 5):
Code:
mount.cifs -o user=uXXX-sub2,pass=XXX //XXX-sub2.your-storagebox.de/uXXX-sub2 /root/stbox-pmx1/
mount error(2): No such file or directory

So the smbclient can connect, but pvesm refuses to do so. Still investigating.

Later edit (2):

"mount.cifs" is working if I add "vers=1.0".

So basically "pvesm" is not working because it doesn't supports "smbversion 1.0".

Code:
smbversion: value '1.0' does not have a value in the enumeration '2.0, 2.1, 3.0'

Any way to translate this to a functional "pvesm"? I highly doubt that Hetzner will add 2.X or 3.X soon to their StorageBoxes.

For now, as a workaround, we're using "autofs" but a viable/better solution is highly desired.
 
Last edited:
After a long chat with the Hetzner team, I've decided to make a fresh Debian and CentOS box.

Per my surprise, everything worked as expected:
Code:
# smbclient //uXXX-sub2.your-storagebox.de/uXXX-sub2 -U uXXX-sub2 -d 5 -m SMB3
-> negotiated dialect[SMB3_11] against server[uXXX-sub2.your-storagebox.de]

So the Hetzner StorageBox fully supports SMB3.

I've also managed to successfully mount the share:
Code:
#  mount.cifs -o vers=3.11,user=uXXX-sub2,pass=XXX //uXXX-sub2.your-storagebox.de/uXXX-sub2 /mnt/
# ls /mnt/
dump

The SMB3 mount is successful on both Debian and CentOS (latest).

Running the same/exact command on PVE6 returns this:
Code:
#  mount.cifs -o vers=3.11,user=uXXX-sub2,pass=XXX //uXXX-sub2.your-storagebox.de/uXXX-sub2 /mnt/
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

At this point it's very clear that the issue is not at the share, nor at the server, but on the OS/PVE.

Any hints are highly appreciated!
 
Last edited:
I've exactly the same problem - get cifs error -2. Proxmox 6 at 3 servers and the Hetzner Backup Storage.
I've tried some "version" and "sec" strings but the result is always the same. Basic command:
Code:
mount.cifs //uxxxxxx.your-backup.de/backup /tmp/test -o username=uxxxxxx

Is your issue solved already or is there any idea what we could test / analyse / try to get this working?
 
I've exactly the same problem - get cifs error -2. Proxmox 6 at 3 servers and the Hetzner Backup Storage.
I've tried some "version" and "sec" strings but the result is always the same. Basic command:
Code:
mount.cifs //uxxxxxx.your-backup.de/backup /tmp/test -o username=uxxxxxx

Is your issue solved already or is there any idea what we could test / analyse / try to get this working?
There's nothing I can/could do, I understood that this is a kernel bug: Bug 200145.

From the Bugzilla thread, it seems to be present even in 5.2.1. PVE 6.0-7 uses kernel 5.0.21, which is even older.

What's interesting is the fact that, if you install Proxmox on Hetzner's own infrastructure, it will work. But if you install the same exact ISO on any other ISP, it'll not work.

So at this point I'm not sure if it's the aftermentioned kernel bug, or a networking error on Hetzner's network.

If you find the solution I would really appreciate your hints.
 
Hi, any news about this? i can mount the CIFS with vers=1.0 but i dont know if is optimal in terms of data transfer performance, seems more slow than normal mounts.

Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!