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

Reflink when building store #137

Open
fhackenberger opened this issue Nov 19, 2019 · 1 comment
Open

Reflink when building store #137

fhackenberger opened this issue Nov 19, 2019 · 1 comment

Comments

@fhackenberger
Copy link

fhackenberger commented Nov 19, 2019

When building a store from a directory tree in uncompressed mode, it would be great if desync could also use reflink, as that would reduce the size of the store on disk dramatically.

Use case is: updating filesystems using images and re-using the chunks of the files which are already there.

  • echo '{"store-options": {"/mnt/usb/tmp/btrfs.img.castr": {"uncompressed": true}}}' > ~/.config/desync/config.json
  • desync tar -i -s /mnt/usb/tmp/btrfs.img.castr /mnt/usb/tmp/btrfs.img.caidx /mnt/usb/
  • desync untar -i -s /mnt/usb/tmp/btrfs.img.castr -s ssh://192.168.1.1/path/to/casync.store/ ./update.caidx /mnt/usb/
@folbricht
Copy link
Owner

Do you mean reflinking of parts of chunks within the chunk store?

Chunk-stores dedup already de-dup whole chunks by their hash basically. There's currently no other/smaller hash that is performed on parts of chunks that could be used for reflinks. Also, given the way chunks are created based on split points in the content, I suspect it's very unlikely to align to block boundaries (typically 4k) which is necessary for reflinks. The only parts of chunks that could be reflinked would be blank/0-byte sections within chunks but the tool would still need to know where and how large those are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants