Notifications
Clear all

Database is locked  

  RSS

rd66
 rd66
(@rd66)
New Member
Joined: 2 months ago
Posts: 2
23/05/2020 2:38 am  

I've just installed the virtual appliance and am having trouble configuring it.

I've added an SMB mount to my QNAP NAS.  /etc/fstab as follows:

    //qnap/vmbackups /mnt/vmbackups cifs credentials= removed link ,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

I enter /mnt/vmbackups for the path to a repository on the web page.  When I click next I get: 

    Database is locked.

If I check the /mnt/vmbackup directory in the shell, I see:

    drwxrwxrwx 2 root root          0 May 23 02:23 .
drwxr-xr-x 3 root root 4096 May 23 01:37 ..
-rwxrwxrwx 1 root root 1073741824 May 23 02:23 pure.reserved
drwxrwxrwx 2 root root 0 May 23 02:23 @Recycle
-rwxrwxrwx 1 root root 0 May 23 02:23 SpProps.db
drwxrwxrwx 2 root root 0 May 23 02:20 .syncing_db

Any idea what I've done wrong?

This topic was modified 2 months ago by rd66

Quote
Topic Tags
Marijan Kozic
(@marijan)
Member Admin
Joined: 1 year ago
Posts: 52
23/05/2020 12:26 pm  

Hi. There are two things that could be causing this issue.

The first one is a database locking problem that occurs in recent versions of Pure when a database is accessed by several threads simultaneously. A misconfiguration in the external database code causes other threads to wait more than necessary, which eventually causes timeouts and file locking. The fix has already been implemented and is scheduled for the Pure version 2.0.8. However, I do not think this is the case here as you have not reached a point where there are multiple threads running.

Another thing that could be preventing proper database locking are the cifs mounting parameters. Now, I personally don't have enough experience with cifs to be sure and will try to get someone more knowledgable to weigh in on this but I did find this interesting piece of information:

If you are mounting a CIFS storage, It is possible that the sqlite locking will not work if your network storage is mounted without the nolock parameter. In this case, try adding a noclock parameter to your fstab:

//myserver /mymount cifs username=*****,password=*****,iocharset=utf8,sec=ntlm,file,nolock,file_mode=0700,dir_mode=0700,uid=0500,gid=0500 0 0

From the fstab manual:

lock/nolock Selects whether to use the NLM sideband protocol to lock files on the server. If neither option is specified (or if lock is specified), NLM locking is used for this mount point. When using the nolock option, applications can lock files, but such locks provide exclusion only against other applications running on the same client. Remote applications are not affected by these locks.


ReplyQuote
rd66
 rd66
(@rd66)
New Member
Joined: 2 months ago
Posts: 2
23/05/2020 1:44 pm  

Good call.  I've just started my first backup.

 

Thanks for your help.


ReplyQuote
Share: