dvc: error adding a file to dvc repo on NAS storage
DVC version is 0.62.1 installed by pip on Ubuntu.
I have shared NAS storage mounted on my system and want to create a DVC repo in the storage. I could successfully initialized a repo by dvc init command, but adding a file fails with an error message shown below.
$ ls -al
total 0
drwxrwxrwx 2 root root 0 Nov 20 2019 . <-- has write permission
drwxrwxrwx 2 root root 0 Oct 25 10:37 ..
drwxrwxrwx 2 root root 0 Oct 29 15:30 data <-- want to add this directory after creating a repo
$ dvc init --no-scm
+---------------------------------------------------------------------+
| |
| DVC has enabled anonymous aggregate usage analytics. |
| Read the analytics documentation (and how to opt-out) here: |
| https://dvc.org/doc/user-guide/analytics |
| |
+---------------------------------------------------------------------+
What's next?
------------
- Check out the documentation: https://dvc.org/doc
- Get help and share ideas: https://dvc.org/chat
- Star us on GitHub: https://github.com/iterative/dvc
$ ls -al
total 0
drwxrwxrwx 2 root root 0 Nov 20 09:50 .
drwxrwxrwx 2 root root 0 Oct 25 10:37 ..
drwxrwxrwx 2 root root 0 Oct 29 15:30 data
drwxrwxrwx 2 root root 0 Nov 20 09:50 .dvc <-- repo created successfully
$ dvc add -R data <-- trying to add the directory recursively
ERROR: unexpected error - [Errno 1] Operation not permitted <-- failed with an error message which is unclear to find the cause
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help! <-- made me write this issue
$
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (9 by maintainers)
@skshetry You are right! I tried again with considering your comment, and it turned out the error about
dvc version -v
was neither caused by the weird FS nor dvc itself. There must be incomplete ‘.git’ directory remained aftergit init
before tryinggit status
and caused the error. Thanks for make it clear.I should be more precise. Sorry for my misleading report on
dvc version
command.@midnightradio, the error in https://github.com/iterative/dvc/issues/2818#issuecomment-555885457 is due to
git init
earlier. But, anyway,version
should quietly work here.I was able to reproduce the same error with:
Output is quite similar:
Thanks @midnightradio ! I think both issue are pretty valid. It’s a reasonable case when you run
dvc add
on the attached storage to get data initially under DVC control since it’s large enough to fit into your local disk/space. @efiop will decide if keep this one open or not (since it looks like you have a workaround), but will definitely keep this scenario in mind.For the version issue - yes, let’s create a separate ticket and if you can contribute the PR that would be awesome 🙏 We’ll try to help you with that.
I think we still should do something about lock. Probably Git is not the best analogy for us in this case.
@midnightradio could you elaborate on your case a little bit please? Why do you want to run the repo on a NAS storage directly?