Azure Linux Client on Samba Share: Database is locked

Moderators: Site Moderators, FAHC Science Team

Post Reply
niko.foster
Posts: 2
Joined: Sun Apr 21, 2019 9:40 pm

Azure Linux Client on Samba Share: Database is locked

Post by niko.foster »

Hi everybody,
I am trying to setup fah on azure. In order to maximize the effect for my free credits (from an MSDN-account, it's not from a free trial) i want to use the low-priority VMs. However, the low-priority VMs can get preempted by Azure at any time, so i thought i'll setup a samba-file-share within azure. Then i can run the VMs such that all the work-data is saved on the file share. In case a VM gets preempted it will just re-start and continue from the last checkpoint.
I've got the linux FAHClient running, but as soon as i configure it to place the work-data on the samba-share i get the following error:

Code: Select all

21:04:22:Trying to access database...
21:04:52:ERROR:Exception: Error executing: 'CREATE TABLE IF NOT EXISTS Config (name TEXT PRIMARY KEY, value)': database is locked
and FAHCLient will exit. If i run FAHClient somewhere else (i.e. not on the samba-share) it works fine, so i suspect that FAHClient somehow does not like running this way.
I thought this is some problem with the permissions, so i have already tried mounting the samba-share with noperm and the dynperm-options, but this did not change anything.
I am pretty sure that the database is in fact not locked (at least not by an old instance of FAHClient): this happens even if i run FAHClient in a brand new empty directory.

Does anybody have any idea how i could solve this problem? Does anybody have FAHClient running with the work-directory set to a network-file-share?

Regards,
Niko
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Azure Linux Client on Samba Share: Database is locked

Post by bruce »

Why are you trying to use shared files? FAH creates its own working files, (including some DB filoes) in a directory that it creates. the CREATE TABLE IF NOT EXIST phrase should be able to create the fille without any restrictions. Create a partition that's owned exclusively by FAH and I bet it will work.
niko.foster
Posts: 2
Joined: Sun Apr 21, 2019 9:40 pm

Re: Azure Linux Client on Samba Share: Database is locked

Post by niko.foster »

bruce wrote:Why are you trying to use shared files? FAH creates its own working files, (including some DB filoes) in a directory that it creates. the CREATE TABLE IF NOT EXIST phrase should be able to create the fille without any restrictions. Create a partition that's owned exclusively by FAH and I bet it will work.
Yeah, if i run FAH on a disk owned exclusively by the VM it works. However, i want to use azure's low-priority-option because that costs only a fraction of the standard-VMs. The drawback is, of course, that the low-priority VMs might get deleted and re-imaged by azure at any time (to make place for other customers who are paying more). So for that i need some persistant storage, otherwise all the work for the current unfinished WU would be lost.
Azure offers a integrated Samba-File-Share for the VMs, to me this seems to be the easiest way to get the persistant storage i need (in fact, i have not found any other feasible solution for the persistant storage yet)
And yes, i am aware that FAH will store lots of funky database-file in the work-directory. I thought as long as only a single instance of FAHClient is accessing a specific work-directory i should be fine (yes, i do have a mechanism to make sure that each work-directory on the file-share is accessed only by a single FAHClient).

Regards,
Niko.
jarvis
Posts: 2
Joined: Fri Jan 13, 2017 10:03 am

Re: Azure Linux Client on Samba Share: Database is locked

Post by jarvis »

Hello,

I have the same issue.
I am trying to run Folding@Home from a Docker container attached to an Nvidia GPU, as described here.

You can find my Dockerfile on GitHub.

FAHClient runs well when the working folder is not attached to a persistent storage (documentation here).
When I try to attach the FAHClient working folder to a storage account in Azure, I have the error

Code: Select all

Exception: Error executing: 'CREATE TABLE IF NOT EXISTS Config (name TEXT PRIMARY KEY, value)': database is locked
The goal with persistent storage is: being able to restart a work from a previous state, rather than restart from zero if the container was stopped for any reason.

Do you have any idea?

P.S: the only workaround I found, for now, is to copy files using rsync (script fahfilecopy.sh), from FAHClient working folder, to a folder mounted in an Azure Storage Account (/mnt/fahclient).

Thanks
Post Reply