Because I’m using large files which are tens of gigabytes, I want to use hardlinks as my filesystem doesn’t support reflinks.
I executed the following commands
However when I checked using ls -i the inodes of the file in .dvc/cache and the file in my working directory, they are still different.
Are there any further steps I need to take to get hardlinks to be used?
Also I noticed that both the file in the working directory and cache were still writable, when I thought that they should have been made read-only by using cache.protected = true
Is my understanding here mistaken?
Update:
I mistyped the commands above. I actually had executed them correctly, i.e.:
I’d actually mistyped the commands in my question but had correctly executed them. My config file is set exactly as you said it should be, but I still have the same probem of different inodes and writable files.
In addition I notice that files I added using dvc add after changing the configuration are using hardlinks and are read-only as expected, so I guess the question is how to apply the configuration to files added before the change.
Nope, that doesn’t work either. I also tried pip install dvc --upgrade also just in case it was a problem but it’s still the same with the latest version (0.56.0)
@jcf76 It is a known bug in checkout, we have an issue for it in https://github.com/iterative/dvc/issues/1371 . We’ve addressed a similar issue in sequential dvc add(see link to PR in that issue) and will soon proceed with improving dvc checkout. Thanks for your feedback!