[SOLVED] CIFS Issue - error with cfs lock 'file-storage_cfg' (working now but shows question mark)

JohnMC

Member
Oct 12, 2017
10
3
6
35
I've been playing with the new CIFS mounting options in the webui and cant seem to get it to work. I've turned to the console to try and get more feedback, when I run:
Code:
pvesm cifsscan 192.168.1.2 --username ProxmoxBackup --password Password

I successfully get a list of available shares including my target "ProxmoxBackup" so I run:
Code:
pvesm add cifs extbackup --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password

And I get:
Code:
mount error(95): Operation not supported
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)

So I double check share and file system permissions on the Windows 2008R2 server the share is hosted on and everything is set to full, so I run:
Code:
mkdir /mnt/test
mount -t cifs -o username=ProxmoxBackup,password=Password //192.168.1.2/ProxmoxBackup /mnt/test
touch /mnt/test/testfile
rm /mnt/test/testfile

And this seems to work without issue, what can I do to further understand where the proxmox file storage is getting hung up?

Edit: After reading CIFS wiki a few more times and finding a couple posts talking about smb version, I realized that despite smb version not being available in the web ui, I could set it on the command line. Despite the example showing "3" being a valid value it appears 2.0, 2.1, 3.0 are the exact values you need to use. Setting it to 2.1 worked for me:

Code:
pvesm add cifs extbackup --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password --smbversion 2.1

I wish this option was in the web ui but maybe that will come in the future. The one other thing that I still see wrong is that in the web ui, the icon for the storage under the node shows a question mark as if it's not connected, but it is and i'm able to make and restore a backup using that storage.
 
Last edited:

luka_matkic

New Member
Apr 3, 2020
1
0
1
26
Thanks JohnMC, your answer helped me big time :)

I just want to point one more thing witch may result in Proxmox returning error code.
I have copy-pasted your command and changed username and password but got "400 - too many arguments".

The problem was in my password containing "#" and "!" characters.
I created new account without these characters and problem was solved.
 

mls228

New Member
Sep 19, 2020
2
0
1
44
Just wanted to resurrect this thread and note that it helped me immensely and I had to change the --smbversion to 2.0 on my older Synology NAS.

pvesm add cifs extbackup --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password --smbversion 2.1
 

An Hak

Member
Jun 11, 2018
9
0
6
42
I've been playing with the new CIFS mounting options in the webui and cant seem to get it to work. I've turned to the console to try and get more feedback, when I run:
Code:
pvesm cifsscan 192.168.1.2 --username ProxmoxBackup --password Password

I successfully get a list of available shares including my target "ProxmoxBackup" so I run:
Code:
pvesm add cifs extbackup --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password

And I get:
Code:
mount error(95): Operation not supported
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)

So I double check share and file system permissions on the Windows 2008R2 server the share is hosted on and everything is set to full, so I run:
Code:
mkdir /mnt/test
mount -t cifs -o username=ProxmoxBackup,password=Password //192.168.1.2/ProxmoxBackup /mnt/test
touch /mnt/test/testfile
rm /mnt/test/testfile

And this seems to work without issue, what can I do to further understand where the proxmox file storage is getting hung up?

Edit: After reading CIFS wiki a few more times and finding a couple posts talking about smb version, I realized that despite smb version not being available in the web ui, I could set it on the command line. Despite the example showing "3" being a valid value it appears 2.0, 2.1, 3.0 are the exact values you need to use. Setting it to 2.1 worked for me:

Code:
pvesm add cifs extbackup --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password --smbversion 2.1

I wish this option was in the web ui but maybe that will come in the future. The one other thing that I still see wrong is that in the web ui, the icon for the storage under the node shows a question mark as if it's not connected, but it is and i'm able to make and restore a backup using that storage.


Just wanted to thank you for this post. I got the same error with Proxmox VE 6.3-2 and used your command. It worked perfectly. Thanks alot.
 

tudor-s

New Member
Mar 17, 2021
5
0
1
26
Hello guys, I spent a lot of time to find a fix for this error.
For me the solution was to increase the timeout value from 10 to 40 in "check_connection" section from CIFSPlugin.pm file (path: „/usr/share/perl5/PVE/Storage/)

Proxmox VE version 6.3-6

pve.6.3.3.check_connection.png
 
Last edited:

dotdot

New Member
Mar 27, 2021
1
0
1
62
I had the same problem, stumbled upon this forum post and it helped tremendously, but I think I understand what is going on...

1. Seems that the when creating CIFS storage from the GUI that Proxmox (v6.3-2 in my case) assumes that the remote server supports CIFS v3. I experienced the problem using an old QNAP NAS. When I saw the error, the NAS was configure for CIFS v2 as the highest version to support. Changing the CIFS version to 2.1 still produced the error, however, the GUI worked fine when the QNAP was configured to support CIFS v3.

2. When I had trouble creating the CIFS storage volume I noticed a message on the console of the physical pve server saying "... Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers ... cifs_mount failed w/ return code = -95".

3. As pointed out previously in this thread, there is no provision to specify the CIFS version using the GUI (would be a nice to have feature), HOWEVER, I was able to follow the example for JohnMC to do this on the command line before I changed the CIFS version support on my NAS.

4. FYI, I also tried editing the timeout value in CIFSPlugin.pm, but that didn't work for me.
 

velocity08

Member
May 25, 2019
218
11
23
45
Hi All

thought i would add to this thread for completeness :)

Bash:
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)

Another discovery i've found that triggers the same error is when you use the same user name to access another share on the same backup storage under a different share name.

example.

Bash:
pvesm add cifs share1 --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password

pvesm add cifs share2 --server 192.168.1.2 --share ProxmoxBackup2 --username ProxmoxBackup --password Password

you can see in the above example:

- share name is different
- IP address is the same
- user name is the same

this is a common scenario when you have 1 storage appliance and you wish to backup to a different share on the same appliance.

the take away here is to have a different user name to access the share otherwise ti wont mount.

""Cheers
G
 

Saldru

New Member
Oct 7, 2020
3
2
1
Metz, France
www.salnet.wf
Hi everyone,

I have 3 PVE running 6.3-6. I noticed that in cli the --smbversion option don't seems to work as it supposed to. My SMB server (4.12.2) require SMB3 as min version however in CLI even if I specify or not --smbversion 3.0, I can see in my SMB server logs that the CIFS client of PVE is always trying to negociate SMB 2.002 then SMB 2.??? then Selected protocol SMB2_FF. With a regular CIFS command it negociate SMB3_11. On my SMB server if I specify server min protocol = SMB2 I'm able to connect with pvesm.

I think there is an issue with the command and it don't take in account the SMB version you want.

Kind regards,
Saldru
 

firefox7518

New Member
Jul 17, 2020
1
0
1
40
Hi All

thought i would add to this thread for completeness :)

Bash:
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)

Another discovery i've found that triggers the same error is when you use the same user name to access another share on the same backup storage under a different share name.

example.

Bash:
pvesm add cifs share1 --server 192.168.1.2 --share ProxmoxBackup --username ProxmoxBackup --password Password

pvesm add cifs share2 --server 192.168.1.2 --share ProxmoxBackup2 --username ProxmoxBackup --password Password

you can see in the above example:

- share name is different
- IP address is the same
- user name is the same

this is a common scenario when you have 1 storage appliance and you wish to backup to a different share on the same appliance.

the take away here is to have a different user name to access the share otherwise ti wont mount.

""Cheers
G
You are my hero! I wasted hours because of this because every connection check was fine. Is this a proxmox issue or a generic Linux/CIFS issue?
 

velocity08

Member
May 25, 2019
218
11
23
45
You are my hero! I wasted hours because of this because every connection check was fine. Is this a proxmox issue or a generic Linux/CIFS issue?
not sure to be honest haven't played with it enough

at the end of the day we know its an issue and the fix is to create another user name for the new share.

enjoy!

""Cheers
G
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!