New issue
Advanced search Search tips

Issue 826144 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 21
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

termina_build_image: use hard links for lddtree paths

Project Member Reported by smbar...@chromium.org, Mar 27 2018

Issue description

Reduce rootfs size by using hard links for libraries that were copied by lddtree.
 

Comment 1 by vapier@chromium.org, Mar 27 2018

can you clarify/show an example of what you're referring to ?

you want to replace symlinks with hard links ?  or something else ?
At least by inspecting latest tatl image, this is what I see:

libc for garcon and the rest of tatl have the same contents (expected):
$ md5sum /opt/google/garcon/lib/libc.so.6 /lib64/libc-2.23.so
45a7c5242ec147a447424a8187756ae1  /opt/google/garcon/lib/libc.so.6
45a7c5242ec147a447424a8187756ae1  /lib64/libc-2.23.so

But they don't share the same inode:
$ ls -i /opt/google/garcon/lib/libc.so.6 /lib64/libc-2.23.so 
 69 /lib64/libc-2.23.so  211 /opt/google/garcon/lib/libc.so.6

So unless there's some deduplication happening elsewhere, this is using 2x the disk space for libraries that are shared with the rest of tatl.

Comment 3 by vapier@chromium.org, Mar 27 2018

that's because garcon was told to output to a unique path with the explicit purpose of being a standalone root to be bind mounted in.  depending on the component process, the filesystem might take care of deduping, but prob better to do this ourselves.

we could write a python script to do it or use fdupes.
Labels: Hotlist-Crostini-Platform
Status: Fixed (was: Assigned)

Sign in to add a comment