[SOLVED] PBS on NFS: Unable to acquire lock "/etc/proxmox-backup/.datastore.lck" ...

hellfire

Well-Known Member
Aug 17, 2016
68
35
58
46
I'm trying to set up a datastore on top of NFS. I ran into this issue:

Code:
Unable to acquire lock "/etc/proxmox-backup/.datastore.lck" - Interrupted system call (os error 4)

I did the following:
  1. created a new datastore on an nfs mounted path
  2. tried to create another datastore also on an nfs mounted path
  3. I got the above mentioned error
Reason for the error:

If the user "backup" on the remote system is not known, the owner/group is set to the default user/group (anonymous?). Thatswhy PBS can no longer write/access the Datastore after having created it. So the remote System must a) know the user/group and b) it has to be with the same uid/gid like it is on the PBS.

This is how I fixed it:
  1. I checked on the NFS-Server if uid=34 and username "backup" is not used so far in /etc/passwd
  2. I checked on the NFS-Server if gid=34 and groupname "backup" is not used so far in /etc/group
  3. I created a user "backup" with uid=34 on the NFS-Server
  4. I created a group "backup" with gid=34 on the NFS-Server
  5. chown-ed all shared NFS-Directories on the NFS-Server (chown -r backup:backup /path/to/exported_dir1 ...)
  6. I unmounted all NFS-Shares on the PBS
  7. I mounted again all NFS-Shares on the PBS
  8. I deleted the file /etc/proxmox.backup/.datastore.lck (Be sure no task is running on the PBS!)
 
Last edited:
NFS does not support locking.
The file which is pbs not able to lock is not located on NFS but locally in PXCFS (Proxmox Cluster File System). I assume the error because some process crashed and did not release the lock of /etc/proxmox-backup/.datastore.lck or did just not delete the Lock-file. So the error is not: The system can not lock a file on NFS. This is not needed.
 
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!