Error: cannot acquire lock: Lock FcntlFlock of /path/to/repo/repo.lock failed: operation not supported

Duplicating my issue from Github here, in the hope it’l receive some attention:

Version information:

go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/darwin
Golang version: go1.15.8

OSX Version: 10,14,8

Description:

As per title. IPFS worked fine with default setup [ie. storing data locally]. I then tried to move my repo to a NAS [mounted via SMB] by adding export IPFS_PATH=/Volumes/stuzbot/IPFS to my ~/.zshrc file and re-initialising.

Now, when I run ipfs daemon I get the following error:

Initializing daemon...
go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/darwin
Golang version: go1.15.8

Error: cannot acquire lock: Lock FcntlFlock of /Volumes/stuzbot/IPFS/repo.lock failed: operation not supported

I’ve tried both reinitialising the repo from scratch at the new NAS location with ipfs init and also copying over the existing contents from the old default ~/.ipfs location. But I get the same error each time. I can see that, after running ipfs daemon a zero bytes repo.lock file is actually created in the repo directory but the error message still persists.

I have full read/write permissions for the NAS itself and for the directory I am trying to use as my IPFS repo.

Anyone got any suggestions? It seems bizarre I’ve not been able to find an obvious solution to this online. Surely most people running IPFS nodes are going to want to be doing so with the storage located on external drives?

It would seem SMB mounts do not support POSIX file-locking mechanisms.

I would suggest you keep .ipfs in your local machine and move the blocks or badger subfolders to the NAS.

Also, see Also, see cannot acquire lock: Lock FcntlFlock of {location}/.ipfs/repo.lock failed: operation not supported · Issue #1507 · ipfs/ipfs-desktop · GitHub

I did wonder that. It’s odd though because I use Forklift3 File manager in OSX and, with that, if I have a file on the SMB share selected in one of Forklift3’s windows, I’m not able to do anything with that file [ie. save changes to it] from within another app, as OSX reports that I don’t have permission to access said file --which obviously suggests that Forklift has somehow managed to apply a file-lock to it. Mind you, as this doesn’t happen with OSX Finder or PathFinder and isn’t desired behaviour, it looks like Forklift have ‘rolled their own’ [over-aggressive] file locking mechanism.

That’s actually what I was looking to do originally. The IPFS docs say that:

IPFS is a light-weight application in terms of CPU and RAM usage. You can run an IPFS node on a Raspberry Pi.

And I want to run it off Raspberry Pi. But, obviously a Raspberry Pi has minimal storage. So I wanted to run IPFS on the Pi with the data stored on a connected NAS. I couldn’t find any info on how to set that up and don’t have the storage space on my Pi to experiment with a default installation. So I installed IPFS on my OSX laptop, just to try and suss out the required configuration options there, before moving it to the Pi.

So, ultimately, any OSX specific problems are a bit of a side issue. My ultimate aim is to have IPFS running on a Raspberry Pi with the data stored elsewhere. So having .ipfs on the Pi and moving the blocks to the NAS would be fine. Any documentation you could point me to, where I can find how to do this?