Repository navigation
fix(nvidia): replace /usr overlay mounts with reflink copies so dnf updates survive reboot - #2841
Merged
Merged
Conversation
mselim00
approved these changes
Oct 1, 2026
kummatty
commented
Oct 1, 2026
| [Service] | ||
| Type=oneshot | ||
| RemainAfterExit=true | ||
| ExecStart=/usr/bin/bash -c 'shopt -s dotglob; cp -a --reflink=auto /opt/nvidia/current/usr/%i/* /usr/%i/' |
Contributor
Author
There was a problem hiding this comment.
I tried using a simple /usr/bin/cp command for this instead of a shell, but doing cp src/. desc/ carries the execution mode of src into dest. The exec mode for /opt/$TREE/usr/lib64 gets copied over to /usr/lib64
mselim00
approved these changes
Oct 1, 2026
aaithal
reviewed
Oct 1, 2026
| @@ -0,0 +1,18 @@ | |||
| [Unit] | |||
Contributor
There was a problem hiding this comment.
Can we add coverage in validate.sh for this and the other new units?
Contributor
Author
There was a problem hiding this comment.
I don't think there is anything meaningful we can add to validate, besides what's already defined within the units. We are planning to add build validations, for the exact files we copy outside of validate. Please let me know if you have a specific validations in mind?
…pdates survive reboot
aaithal
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
The NVIDIA driver tree was exposed at
/usr/{bin,lib64,share}through overlay mounts, so package updates such asdnf update systemd*wrote into the overlay upperdir instead of the real/usr. On the next boot systemd starts before the overlays are mounted, can't find its new libraries, and the node fails to boot.This replaces the three mount units with
nvidia-copy-usr@.service, run as@bin,@lib64and@sharein parallel afternvidia-driver-resolve. Each instance copies the tree's entries into the real directory once withcp -a --reflink=auto, and a per-directory marker skips it on later boots.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done