Add'ed files are duplicated in the cache, no links

I have started using dvc by running dvc init and then dvc add for two directories and one file.

All worked fine, all filed have been copied to the cache but I noted that the total disk usage has doubled as the original files remained in addition to the cached copies.

The original files do not show any signs of being reflinks.

Is this right?

I am using Ubuntu 16.04.

@byoussin Does your fs support reflinks? You could check it with dvc version command. If it does not, then copies are a fallback that we use when reflinks are not supported. You could also use hardlinks or symlinks, as described in https://dvc.org/doc/commands-reference/config#cache .

@kupruser Thanks!
Indeed, dvc version says:

Cache: reflink - False, hardlink - True, symlink - True

It appears that normally ubuntu filesystems do not support reflinks, although some do:
https://techsparx.com/linux/disks/ubuntu-xfs.html

Mine apparently does not.

1 Like