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

casync chunks the seed chunk store #511

Closed
fhackenberger opened this issue Nov 14, 2019 · 5 comments
Closed

casync chunks the seed chunk store #511

fhackenberger opened this issue Nov 14, 2019 · 5 comments
Assignees

Comments

@fhackenberger
Copy link

fhackenberger commented Nov 14, 2019

RAUC with casync seems to create a chunk index of the chunk index when installing a RAUC bundle.

root     29897  0.0  0.1 256164 10172 pts/0    Sl   18:36   0:00 rauc -d install /tmp/board-system-images-v3/update.casync.raucb
root     29922 85.9  0.1  48132 14444 ?        R    18:36  11:15 casync --log-level=debug --verbose extract --seed /run/rauc/rootfs.0 --store /tmp/board-system-images-v3/update.casync.castr --seed-output=no /run/rauc/bundle/rootfs.tar.gz.caidx /run/rauc/rootfs.1
ubuntu@sign-pc-18:~$ sudo du -xhcs /var/tmp/*.cased | sort -n     
3.3G    total
3.3G    /var/tmp/3a875a5021649923.cased

Logs from casync run by rauc:

Nov 12 18:48:54 sign-pc-18 rauc[29863]: Seeding var/tmp/3a875a5021649923.cased/ec82/ec828c3b0e9ca9277f2b36051edce47e8cae0e128e3fb21aeb70de8978c0ae99
Nov 12 18:48:54 sign-pc-18 rauc[29863]: Seeded var/tmp/3a875a5021649923.cased/ec82/ec828c3b0e9ca9277f2b36051edce47e8cae0e128e3fb21aeb70de8978c0ae99

In general it would be great, if casync could use reflinks when creating an uncompressed chunk store for a seed and rauc would set casync to use that. Not sure if this feature is available though. It would resolve a big issue with using casync (Less than 50% disk usage on slots is allowed).

@fhackenberger
Copy link
Author

The solution for the bug is quite easy:
Write a .caexclude file with the content:
/var/tmp/*.cased
and store it in / before running casync. This should happen in casync_extract in src/update_handler.c if a seed is set. Maybe there is also a way to make that path explicit when calling casync, from what I understand casync creates a new random directory for the extract run, if --seed is specified.

@fhackenberger
Copy link
Author

See #513 for a workaround, where a user created .caexclude file can be used to fix the initial casync make run.

@ejoerns
Copy link
Member

ejoerns commented Jan 3, 2020

Maybe the right option is to set TMPDIR to a device not being the seeded one? Should be combined with --exclude-submounts=yes if I get it right.

@fhackenberger
Copy link
Author

In our current use case, with a large base image, having a separate tmpdir would create the need for a third large partition and would leave the issue with the very slow installation unresolved. So we went for the use-case I described in the PR. I'll close this now thanks for your feedback!

@ejoerns
Copy link
Member

ejoerns commented Jan 6, 2020

Maybe it is worth documenting the different RAUC/casync use cases together with their needs, pros and cons.
(And also write some hints on TMPDIR storage location).

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

3 participants