Skip to content

Conversation

@owtaylor
Copy link

When use libguestfs to mount the intermediate image to create a tarball, pass the "use_ino" option so that original inode numbers are preserved. This fixes a problem where hardlinks were not properly preserved in the output.

This is a minimal-code-change fix - an edge case bug and better approach are described in comments.

Resolves #412

When use libguestfs to mount the intermediate image to create a tarball,
pass the "use_ino" option so that original inode numbers are preserved.
This fixes a problem where hardlinks were not properly preserved in the
output.

This is a minimal-code-change fix - an edge case bug and better approach are
described in comments.

Resolves redhat-imaging#412
# - On different partitions
# - With the same inode number
#
# Then the groups will be incorrectly merged in the output image. This

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too bad there isn't a derive_ino option or something that would hash the underlying st_ino and st_dev together. I guess the mounting could also do a 1-to-1 guestfs_handle.mount_local call for every g.mount_options call in launch_inspect_and_mount so tar would see the separate file systems as separate. anyway, like you said, tar_out_opts clearly seems like the best "right" answer and use_ino seems like the best "right now" answer.

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

Successfully merging this pull request may close these issues.

Hard link disappeared when built docker image

2 participants