Skip to content

linkOrCopy: Fallback upon cross-device link error (EXDEV)#8614

Merged
edolstra merged 1 commit intoNixOS:masterfrom
ShamrockLee:quickfix-exdev
Jun 30, 2023
Merged

linkOrCopy: Fallback upon cross-device link error (EXDEV)#8614
edolstra merged 1 commit intoNixOS:masterfrom
ShamrockLee:quickfix-exdev

Conversation

@ShamrockLee
Copy link
Copy Markdown
Contributor

@ShamrockLee ShamrockLee commented Jun 30, 2023

Motivation

Fix building derivations in local chroot store on OpenAFS, where hard linking accross directories causes cross-device link error (EXDEV).

If applied, this patch enables HPC users to build packages with the statically-linked Nix binary where OpenAFS are used as the shared network-based FS.

We workaround similar situation for BeegFS this way in 05cc5a8.

It would be more ideal to bind-mount those paths when hard-linking is unsupported, but let's fix it first before having a more elegant solution.

Context

Fixes #8611

Cc: @Ericson2314

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

Fix building derivations in local chroot store on OpenAFS,
where hard linking accross directories causes cross-device link error
(EXDEV).
@ShamrockLee ShamrockLee requested a review from thufschmitt as a code owner June 30, 2023 13:41
@edolstra edolstra merged commit 7b5ca7e into NixOS:master Jun 30, 2023
@ShamrockLee ShamrockLee deleted the quickfix-exdev branch July 6, 2023 04:26
@fricklerhandwerk fricklerhandwerk added bug store Issues and pull requests concerning the Nix store labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail to build derivation inside local chrooted store on a network-based file system due to uncaptured hard-linking failure (cross-device link)

3 participants