Skip to content

omc upgrade fails with "invalid cross-device link" #192

@palonsoro

Description

@palonsoro

On a system with the following characteristics:

  • Linux (Fedora 41) on x86-64
  • /tmp folder is on a different mount point than omc installation folder (omc is installed in ~/bin, /tmp is a tmpfs).

The following error happens:

rename /tmp/omcExecutable_3663917093.tmp /home/someuser/bin/omc: invalid cross-device link

As per what I could confirm with a quick strace, the os.Rename call used in #177 results on a renameat syscall in Linux:

424907 12:24:49.433105 renameat(AT_FDCWD</home/someuser>, "/tmp/omcExecutable_3663917093.tmp", AT_FDCWD</home/someuser>, "/home/someuser/bin/omc") = -1 EXDEV (Invalid cross-device link) <0.000016>

And as per what man renameat says, it is required that they are in the same mount point.

Not sure what would the best approach, maybe copying and deleting instead of renaming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions