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

Set OPT_TOOL_PATH in fpsync #44

Merged
merged 1 commit into from
Jan 11, 2023
Merged

Set OPT_TOOL_PATH in fpsync #44

merged 1 commit into from
Jan 11, 2023

Conversation

biocyberman
Copy link
Contributor

The variable needs is set so job_queue_info_dump and job_queue_info_load functions will work correctly during a resume run

The variable needs is set so `job_queue_info_dump` and
`job_queue_info_load` functions will work correctly during a
resume run
@martymac
Copy link
Owner

martymac commented Jan 9, 2023

Hello,

Thanks for your pull request. Could you give me an example where resuming fails ? Do you have a reproducible use case ?

@biocyberman
Copy link
Contributor Author

Hi
Without the patch, this is the how you can reproduce the issue:

# Generate a resumable run, without setting the -T argument. For example
fpsync -p <source_path> <target_path> 
# OPT_TOOL_PATH will be empty and saved into `info` file by `job_queue_info_dump`
# Resume the run
fpsync -r <run_id> 
# job_queue_info_load will check if OPT_TOOL_PATH is absolute path and it fails and die at 
# this line: https://github.com/martymac/fpart/blob/master/tools/fpsync#L808 

Hope this help, otherwise I can try to create a re-runnable script.

@martymac martymac merged commit e6fb280 into martymac:master Jan 11, 2023
@martymac
Copy link
Owner

Thanks for additional details, I've merged your patch!

(this is something that must have been overlooked in commit d2aea00)

Best regards,

Ganael.

martymac added a commit that referenced this pull request Jan 11, 2023
@biocyberman
Copy link
Contributor Author

biocyberman commented Jan 13, 2023

My pleasure, Ganael. I am using this tool to migration hundreds of millions of small files. Great lessons learned during this process. I will try to write it up when I am done. Thanks for developing this tool. It saves us tons of headache.

@martymac
Copy link
Owner

You're welcome! And thanks for those kind words, it's always a pleasure to read that :)

Cheers,

Ganael.

@gstalnaker
Copy link

gstalnaker commented Nov 26, 2023

Gentlemen - I'm hoping you can provide me a set of steps to get passed this issue. I was in the midst of migrating 4.5Tb of data from failing HDD to new HDD. After 12+ hours, the file transfer rate seemed to drop by a substantial amount (in the 30Mb/sec rang to 2-5Mb/sec). Knowing (!!) I could resume the job, I killed fpsync so I could increase the verbosity output. Now I'm getting this on resume attempt:

[~]$ fpsync -v -n 10 -f 10000 /mnt/SeagateNTFS/ /mnt/expansionHDD/
1700947631 Info: Run ID: 1700947631-185847
1700947631 ===> Analyzing filesystem...
1700957202 <=== Fpart crawling finished
.1701027313 ===> Interrupted again, killing remaining jobs
1701027314 <=== Parts done: 629/764 (82%), remaining: 135
1701027314 <=== Time elapsed: 79683s, remaining: ~17102s (~126s/job)
1701027314 <=== Fpsync interrupted.
...
[~]$ ~/bin/fpsync.sh -r 1700947631-185847 
Invalid option value loaded from resumed run: OPT_TOOL_PATH

And I cannot resume the job.

This started with the repository installed fpsync. Last run above is the newest fpsync code I've downloaded from https://github.com/martymac/fpart/blob/master/tools/fpsync and put in my own local $HOME/bin folder as fpsync.sh. I've tried to manually export a ENV thus:

[~]$ export OPT_TOOL_PATH='/usr/bin/'
[~]$ ~/bin/fpsync.sh -r 1700947631-185847
Invalid option value loaded from resumed run: OPT_TOOL_PATH

Which as you can see did not work. I confirm that fpart, rsync, cpio, and tar are in /usr/bin/

I'm 18% from finishing this 4.5Tb data transfer, so still a lot more to go and a certainly do not want to start over!

@gstalnaker
Copy link

Heh! Nevermind. With the comment from biocyberman on Jan 11 I was able to search the code and eventually discover the /tmp/ folder, the job folders, and the info file. I added the path there for the variable and I've now successfully restarted the file transfer.

@gstalnaker
Copy link

A final comment - the fpsync code downloaded (see link above) and put in the .sh script file did NOT work on resume. I got the following output:

[/mnt/SeagateNTFS]$ ~/bin/fpsync.sh -r 1700947631-185847
/home/guyst/bin/fpsync.sh: 952: arithmetic expression: expecting primary: "             0 +          "
/home/guyst/bin/fpsync.sh: 969: arithmetic expression: expecting primary: "             0 +          "
/home/guyst/bin/fpsync.sh: 799: arithmetic expression: expecting primary: "                  +              "

I know this code is not released, but figured you might want to know this in case it's not something you've seen before. All I did was use the copy option at the top right of that linked page to copy the code, then past into a text editor (SublimeText), then saved, chmodded it to run it.

The resume worked with the repository installed fpsync and is running as I type maxxing at about 83Mb/sec

Since I've got your attention -thanks for an excellent tool! I was a bit anxious at this failing drive and how to get 4.5Tb of data off of it in a reasonable amount of time. Your tool is the answer (without using parallels and rsync).

@martymac
Copy link
Owner

Hello,

Unfortunately, I cannot reproduce the problem. Have you seen commit a74f1c9 which should fix that kind of error when a .meta file is not present ?

Also, as fpsync evolves, it may not be able to resume a run generated with a previous version of itself. Could you try to generate and resume a run with a new (the same) version of fpsync ?

Finally, fpart and fpsync are developped together : new versions of fpsync need new options provided by fpart. So, please, do not use a new version of fpsync with an old version of fpart, that may not work well. If you want to use the repo version, you should recompile fpart to use it with fpsync.

Best regards,

Ganael.

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

Successfully merging this pull request may close these issues.

3 participants