dvc: unable to open database on mapped network drive
I just installed dvc. My repository is on a mapped network drive, and dvc cannot open the database file. It seems to work perfectly if the repository is on the local C: drive. for the example below, I just made a repositiory on my home network storage, which is mapped to the Z: drive.
timbp@Eucalypt MINGW64 /z/MyVideos
$ git init
Initialized empty Git repository in //192.168.29.3/MyLibrary/MyVideos/.git/
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ dvc init
You can now commit the changes to git.
+---------------------------------------------------------------------+
| |
| 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
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .dvc/.gitignore
new file: .dvc/config
new file: .dvc/plots/confusion.json
new file: .dvc/plots/default.json
new file: .dvc/plots/scatter.json
new file: .dvc/plots/smooth.json
Untracked files:
(use "git add <file>..." to include in what will be committed)
chasings.mp4
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ git commit -m "testing"
[master (root-commit) 1f5f95a] testing
6 files changed, 128 insertions(+)
create mode 100644 .dvc/.gitignore
create mode 100644 .dvc/config
create mode 100644 .dvc/plots/confusion.json
create mode 100644 .dvc/plots/default.json
create mode 100644 .dvc/plots/scatter.json
create mode 100644 .dvc/plots/smooth.json
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ dvc add chasings.mp4
ERROR: unexpected error - unable to open database file
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ dvc status
ERROR: failed to obtain data status - unable to open database file
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ dvc version
WARNING: Unable to detect supported link types, as cache directory '\\192.168.29.3\MyLibrary\MyVideos\.dvc\cache' doesn't exist. It is usually auto-created by commands such as `dvc add/fetch/pull/run/import`, but you could create it manually to enable this check.
DVC version: 1.5.0 (pip)
---------------------------------
Platform: Python 3.8.3 on Windows-10-10.0.19041-SP0
Supports: http, https
Repo: dvc, git
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ ls -l .dvc
total 0
-rw-r--r-- 1 timbp 197121 0 Aug 19 12:21 config
drwxr-xr-x 1 timbp 197121 0 Aug 19 12:21 plots/
drwxr-xr-x 1 timbp 197121 0 Aug 19 12:32 tmp/
timbp@Eucalypt MINGW64 /z/MyVideos (master)
$ ls -l .dvc/tmp/
total 2048
drwxr-xr-x 1 timbp 197121 0 Aug 19 12:21 index/
-rw-r--r-- 1 timbp 197121 7 Aug 19 12:33 lock
-rw-r--r-- 1 timbp 197121 7 Aug 19 12:33 updater.lock
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (11 by maintainers)
Commits related to this issue
- repo: allow user to specify different state and index tmp dir locations Allow user to override state's cache and remote's index files location through config when, say, the repository is located on a... — committed to agurtovoy/dvc by agurtovoy 3 years ago
- repo: allow user to specify different state and index tmp dir locations Allow user to override state's cache and remote's index files location through config when, say, the repository is located on a... — committed to agurtovoy/dvc by agurtovoy 3 years ago
- reincorporate PR 6111 into current master, re: #4420 (#6419) * rebased PR 6111 onto master * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci... — committed to iterative/dvc by nueschs 3 years ago
- Revert "reincorporate PR 6111 into current master, re: #4420 (#6419)" This reverts commit b286c311f451261b16b63b6e3f33f88d09240136. — committed to efiop/dvc by efiop 3 years ago
If anyone is looking for a workaround for this while the team is working on a more permanent fix, installing DVC from this fork will allow you to configure DVC to store its SQLite-based state and remote indexes somewhere else:
Here’s the corresponding PR: https://github.com/iterative/dvc/pull/6111
This is also happening to me, when working with DvC inside a docker and my repository is mounted as a volume. Very easy to reproduce. I think it’s a sqlite problem more than DvC’s
Fixed by https://github.com/iterative/dvc/pull/6419
@ivsanro1 Thanks! We are aware of this problem on nfs, cifs, overlayfs, etc and will be looking into it deeply in the coming weeks as 2.0 QA. Thank you for the feedback and stay tuned! 🙏
That’s correct. And I keep checking to see if there’s something wrong with the state file (not even created yet) or the permissions on the tmp directory or something. No leads until I search for this error message on github.
Apart from a more meaningful error message, I wonder if (at least for this situation), the sqlite database could be moved to %TEMP% instead, which is surely on a local drive.