Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPFS repo cannot be stored on a NAS (SMB, etc.). #8005

Open
madranet opened this issue Mar 23, 2021 · 5 comments
Open

IPFS repo cannot be stored on a NAS (SMB, etc.). #8005

madranet opened this issue Mar 23, 2021 · 5 comments
Labels
effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now

Comments

@madranet
Copy link

madranet commented Mar 23, 2021

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.

@madranet madranet added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Mar 23, 2021
@welcome
Copy link

welcome bot commented Mar 23, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@hsanjuan
Copy link
Contributor

hsanjuan commented Mar 26, 2021

@Stebalien Stebalien added kind/enhancement A net-new feature or improvement to an existing feature and removed kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Mar 31, 2021
@Stebalien
Copy link
Member

Stebalien commented Mar 31, 2021

Unfortunately, SMB doesn't support file locks which are required by go-ipfs. Furthermore, performance is likely going to be absolutely terrible if you want to put your entire repo on a remote machine so the likelihood of anyone trying to make this work in the future is pretty low.

If you want to do this, I recommend mounting your SMB directory under ~/.ipfs/blocks so that only the blockstore (where most of the data goes) gets stored on the remote machine.

@Stebalien Stebalien added effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful P4 Very low priority P3 Low: Not priority right now and removed P4 Very low priority labels Mar 31, 2021
@madranet
Copy link
Author

madranet commented Mar 31, 2021

If you want to do this, I recommend mounting your SMB directory under ~/.ipfs/blocks so that only the blockstore (where most of the data goes) gets stored on the remote machine.

As simple as that eh? That was what I wanted to know anyway. How to move the actual data onto an external HDD. I thought it might involve a lot of complex config jiggery-pokery. There's enough room on the Raspberry Pi to store the other 'stuff' but the actual file data needs to be somewhere else. I'll give this a go and see if it works.

@Stebalien Stebalien changed the title Error: cannot acquire lock: Lock FcntlFlock of /path/to/repo/repo.lock failed: operation not supported IPFS repo cannot be stored on a NAS (SMB, etc.). Mar 31, 2021
@Stebalien
Copy link
Member

Stebalien commented Mar 31, 2021

Yep, as long as you're using the default datastore configuration (if you see a "blocks" directory, putting that directory on the NAS should do it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

3 participants