backup register image failed: command error: unable to get shared lock

tonci

Renowned Member
Jun 26, 2010
107
7
83
Hello,
I installed PBS in vm and attached NFS (ubuntu1804) as datastore. (mounted on /mnt/nfs1)
Everything went straight forward, chunk-folders generated correctly, PBS attached to PVE, but backup failed like this:

INFO: starting new backup job: vzdump 104 --storage PBS01 --mode snapshot --node pve01-inp --remove 0
INFO: Starting Backup of VM 104 (qemu)
INFO: Backup started at 2021-01-07 01:21:51
INFO: status = running
INFO: VM Name: kerio-control
INFO: include disk 'ide0' 'rpool2:vm-104-disk-0' 32G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive 'vm/104/2021-01-07T00:21:51Z'
ERROR: VM 104 qmp command 'backup' failed - backup register image failed: command error: unable to get shared lock - ENOLCK: No record locks available
INFO: aborting backup job
ERROR: Backup of VM 104 failed - VM 104 qmp command 'backup' failed - backup register image failed: command error: unable to get shared lock - ENOLCK: No record locks available
INFO: Failed at 2021-01-07 01:21:58
INFO: Backup job finished with errors
TASK ERROR: job errors

nfs-mount in pbs :
10.10.11.121:/export/nfs2 on /mnt/nfs1 type nfs (rw,noexec,relatime,vers=3,rsize=524288,wsize=524288,namlen=2
55,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.10.11.121,mountvers=3,mountport=47433,mountproto=u
dp,local_lock=none,addr=10.10.11.121)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=815268k,mode=700)

datastore: U-NFS01
comment
gc-schedule daily
path /mnt/nfs1
prune-schedule daily

Backup of this vm104 works to other backup destinations


I'd very appreciate you help and support

Thank you very much in advance

BR
Tonci
 
I am having the same issue. I've tried turning opslock on/off on my NAS, I've confirmed lockd is running on the NAS host. I've also rebooted the NAS and unmounted/remounted the NFS share on the PBS VM, just in case. Still no dice.
 
Fixed it - I had to remove the datastore config, then re-add it. For others doing this, I came across these issues:

a) you cannot add storage to PBS with an existing PBS backup on it using the GUI or the command line tool (".chunks" - EEXIST: File exists" error). You can do it by manually editing /etc/proxmox-backup/datastore.cfg

b) there is an issue manually editing datastore.cfg. If you copy paste an existing example, and space does not get put after 'comments', you'll get parsing '/etc/proxmox-backup/datastore.cfg' failed: line 8 - syntax error (expected section properties)


Bumpy ride but got there eventually! Thanks :)
 
For me the following change of the mount options helped -> "local_lock=all "

10.10.10.12:/mnt/data-1/backupspace-p3-d1/pbs /mnt/pbs nfs rw,async,soft,intr,local_lock=all 0 0

After restarting the PBS, the PVE servers were able to create backups.
 

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!