GithubHelp home page GithubHelp logo

Comments (5)

shankerwangmiao avatar shankerwangmiao commented on August 14, 2024

Woker Id is declared in the name = field in the [global] section of the configuration of the worker. When a worker is successfully registered with the manager, it can be shown in tunasynctl workers. Since normally the size can be reported by a worker automatically, when size is set manually, worker id should be included to act on behalf of that worker.

the field <mirror> indicates the mirror the size of which will be set.

the field <size> indicates the size of that mirror. Currently, <size> is stored purely as a string, so you can use any unit you want.

The correct usage should be:

tunasynctl set-size -w <worker-id> <mirror> <size>

from tunasync.

shankerwangmiao avatar shankerwangmiao commented on August 14, 2024

I have fixed the misleading message in commit 60f92ce

from tunasync.

leochen12-rgb avatar leochen12-rgb commented on August 14, 2024

Successfully, thank you very much

from tunasync.

leochen12-rgb avatar leochen12-rgb commented on August 14, 2024

I want to know how Tuna counts the size of a mirror directory for some very large TB directories when it has a large number of directory levels and files. I currently use du or duc to calculate the directory size, which takes a long time.

from tunasync.

shankerwangmiao avatar shankerwangmiao commented on August 14, 2024

I want to know how Tuna counts the size of a mirror directory for some very large TB directories when it has a large number of directory levels and files. I currently use du or duc to calculate the directory size, which takes a long time.

Normally we do not use du to calculate the size, since the expense on disk IO is too high. The size of mirrors using rsync is extracted automatically from the output of rsync. In terms of other mirrors using custom scripts, some of the scripts we provided in https://github.com/tuna/tunasync-scripts can give a total size of the mirror in the end of output, which can then be matched by the regex defined in the configuration of the worker. For example, the script for the mirror github-releases is handled by the script https://github.com/tuna/tunasync-scripts/blob/master/github-release.py, the total size is given out at https://github.com/tuna/tunasync-scripts/blob/cae1194534d6cce0ddea031a2bf318b9aa0261a3/github-release.py#L296 , and the capture regex is defined at

size_pattern = "Total size is ([0-9\\.]+[KMGTP]?)"
.

from tunasync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.