Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed import prune data to mounted path #1579

Open
Ja7ad opened this issue Nov 2, 2024 · 2 comments
Open

Failed import prune data to mounted path #1579

Ja7ad opened this issue Nov 2, 2024 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Ja7ad
Copy link
Contributor

Ja7ad commented Nov 2, 2024

Description

When import prune data to mounted path got error invalid cross-device link

The error EXDEV (18): invalid cross-device link occurs because os.Rename cannot move files or directories across different file systems (e.g., from one mounted drive to another). os.Rename works only when the source and destination are on the same filesystem.

What Happened

✔ snapshot 2024-11-01 (157.70 MB)

   0% [                              ]  data.zip (0.00 Bytes/157.70 MB) 2024/11/01 11:02:57 download completed


Extracting files...
Moving data...
failed to move directory from /tmp/pactus689140844/data to /home/javad/Work/Pactus/data/testnet/data: rename /tmp/pactus689140844/data /home/javad/Work/Pactus/data/testnet/data: invalid cross-device link

Error happen in:

pactus/util/io.go

Lines 217 to 219 in 9ddfd95

if err := os.Rename(srcDir, dstDir); err != nil {
return fmt.Errorf("failed to move directory from %s to %s: %w", srcDir, dstDir, err)
}

@Ja7ad Ja7ad added bug Something isn't working good first issue Good for newcomers labels Nov 2, 2024
@alidevjimmy
Copy link
Contributor

@Ja7ad How can I reproduce it? what command did you use?

@Ja7ad
Copy link
Contributor Author

Ja7ad commented Nov 8, 2024

@Ja7ad How can I reproduce it? what command did you use?

pactus-daemon import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants