pactus-project / pactus

Pactus blockchain
https://pactus.org
MIT License
213 stars 141 forks source link

Failed import prune data to mounted path #1579

Open Ja7ad opened 2 weeks ago

Ja7ad commented 2 weeks ago

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:

https://github.com/pactus-project/pactus/blob/9ddfd957b038220888fa9213286f5df9a85bda49/util/io.go#L217-L219

alidevjimmy commented 1 week ago

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

Ja7ad commented 1 week ago

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

pactus-daemon import