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 file copy (using rename) #324

Closed
michaepr opened this issue Jan 13, 2024 · 3 comments
Closed

Failed file copy (using rename) #324

michaepr opened this issue Jan 13, 2024 · 3 comments
Labels

Comments

@michaepr
Copy link

michaepr commented Jan 13, 2024

Hello,

I've been following GH's log as I'm writing data to a test setup. There are three drives, the shares folder is on the first drive. Now I copy a file to a share (in the screenshot below called Photography). In this case I'm using the alternative drive selection algorithm so drives 0 and 1 are chosen. Copying the new file test_file_4 to drive 0 is postponed because it's on the same drive as the shares folder. The file is then copied to drive 1 and on the share on drive 0 a symlink is created to the file on drive 1. So far so good.

Judging from the next log entries it seems to me that GH now attempts to use rename to copy the new file from the shares folder to the gh folder on drive 0. It then fails because file sizes don't match (presumably because the rename command copies the symlink rather than the actual file?).

Then GH copies the file on drive 1 to drive 2 and creates a symlink in the shares folder to the file on drive 2. Then it creates another copy on drive 0 and removes the (previously copied) file on drive 1.

So it looks like the rename error creates a lot of unnecessary copies.

2024-01-13_16:41:27

I then tried the same with the default drive selection algorithm. The output is a bit different but the rename still fails and it looks like an additional copy (from drive 2 to drive 0 in this case) is done.

2024-01-13_17:02:14

Would you be able to check that out? Or is there anything I can change in my setup?

@gboudreau gboudreau added the Bug label Jan 13, 2024
@gboudreau
Copy link
Owner

(Please paste your logs in text format next time; just copy-paste in here, and use ``` above and below those text blocks.)

That seems like a regression from previously working code that created file copies using renaming.
I'll try to reproduce it on my side.

@gboudreau
Copy link
Owner

Please try version 0.5.21, to see if it fixes the issue for you.

@michaepr
Copy link
Author

Yes that seems to have worked (based on a quick test). Thanks for your fast reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants