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

JohnMC

Active Member
Oct 12, 2017
11
8
43
39
mclarendata.com
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:
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.
 
  • Like
Reactions: serfnoob
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
 
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.
 
  • Like
Reactions: serfnoob
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:
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.
 
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
 
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
 
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?
 
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
 
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.
thank you also i spent hrs and finally gt it working after viewing this post and reading comments from others..
I am using to host my iso's and have it setup on my tplink archer axe16000 so i had to change smbversion from 2.1 to 2.0 and a few other things but now the ext hdd on my tplink is connected and hosting my iso.

The command i used was
Code:
pvesm add cifs SMBISO --server \\TP-Share --share G --subdir /ProxmoxISO --username admin --password mypass --smbversion 2.0

then i had to use gui to change from disk image to iso and was done.
i tried to get it to use a directory i already had iso's in but couldnt get that working so just created new directory and moved iso's to it..

oh and yes had to remove special characters from my password as mentioned by luka_matkic

thanks!!
 
Last edited:

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!