From 0bf84000770cab7b0f00646a86557d9fa380033a Mon Sep 17 00:00:00 2001 From: GaryH4 Date: Sat, 6 Apr 2019 23:30:04 +0800 Subject: [PATCH 1/4] Added some tips --- docs/zh_CN/tips.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/zh_CN/tips.md diff --git a/docs/zh_CN/tips.md b/docs/zh_CN/tips.md new file mode 100644 index 0000000..a07badc --- /dev/null +++ b/docs/zh_CN/tips.md @@ -0,0 +1,37 @@ +
  • 删除某worker的某镜像 + +先确定已经给tunasynctl写好config文件:~/.config/tunasync/ctl.conf +
    manager_addr = "127.0.0.1"
    +manager_port = 12345
    +ca_cert = ""
    + + +接着 +
    $ tunasynctl disable -w [worker_id] [mirror_name]
    +$ tunasynctl flush
    + +
  • 热重载worker.conf + +$ tunasynctl reload -w [worker_id] + +---- + +e.g. 删除test_workerelvish镜像: + +1. 删除存放镜像的文件夹 + +1. 删除worker.conf中对应的mirror段落 + +1. 接着操作: +
    $ tunasynctl reload -w test_worker
    +$ tunasynctl disable -w test_worker elvish
    +$ tunasynctl flush
    + +1. (可选)最后删除日志文件夹里的日志 +---- + +
  • 删除worker + +$ tunasynctl rm-worker -w [worker_id] + +e.g. $ tunasynctl rm-worker -w test_worker From 7d495c1956d3349a7a2447a4ecca432fc78f1c01 Mon Sep 17 00:00:00 2001 From: GaryH4 <1163549323@qq.com> Date: Sat, 6 Apr 2019 23:40:43 +0800 Subject: [PATCH 2/4] Update tips.md --- docs/zh_CN/tips.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/zh_CN/tips.md b/docs/zh_CN/tips.md index a07badc..73597fc 100644 --- a/docs/zh_CN/tips.md +++ b/docs/zh_CN/tips.md @@ -20,14 +20,14 @@ e.g. 删除test_workerelvish镜像: 1. 删除存放镜像的文件夹 -1. 删除worker.conf中对应的mirror段落 +2. 删除worker.conf中对应的mirror段落 -1. 接着操作: +3. 接着操作:
    $ tunasynctl reload -w test_worker
     $ tunasynctl disable -w test_worker elvish
     $ tunasynctl flush
    -1. (可选)最后删除日志文件夹里的日志 +4. (可选)最后删除日志文件夹里的日志 ----
  • 删除worker @@ -35,3 +35,11 @@ $ tunasynctl flush $ tunasynctl rm-worker -w [worker_id] e.g. $ tunasynctl rm-worker -w test_worker + +---- + +
  • 更新镜像的大小 + +由于du -s比较耗时,故镜像大小直接由rsync的日志文件读出 + +$ tunasynctl set-size -w [worker_id] [mirror_name] size From 4b3741308be880cdbf8edffd78f94996651f850d Mon Sep 17 00:00:00 2001 From: GaryH4 Date: Sat, 6 Apr 2019 23:48:33 +0800 Subject: [PATCH 3/4] Update tips.md --- docs/zh_CN/tips.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/zh_CN/tips.md b/docs/zh_CN/tips.md index 73597fc..bb0cdbe 100644 --- a/docs/zh_CN/tips.md +++ b/docs/zh_CN/tips.md @@ -40,6 +40,8 @@ e.g. $ tunasynctl rm-worker -w test_worker
  • 更新镜像的大小 -由于du -s比较耗时,故镜像大小直接由rsync的日志文件读出 +由于du -s比较耗时,故镜像大小可直接由rsync的日志文件读出 -$ tunasynctl set-size -w [worker_id] [mirror_name] size +$ tunasynctl set-size -w [worker_id] [mirror_name] [size] + +其中,末尾的[size]参数,由操作者设定 From 5eeade22fc786ef3c655d285c7b41941d205707d Mon Sep 17 00:00:00 2001 From: GaryH4 Date: Sun, 7 Apr 2019 19:55:13 +0800 Subject: [PATCH 4/4] Update tips.md --- docs/zh_CN/tips.md | 53 ++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/docs/zh_CN/tips.md b/docs/zh_CN/tips.md index bb0cdbe..cc700d7 100644 --- a/docs/zh_CN/tips.md +++ b/docs/zh_CN/tips.md @@ -1,47 +1,58 @@ -
  • 删除某worker的某镜像 +* 删除某worker的某镜像 -先确定已经给tunasynctl写好config文件:~/.config/tunasync/ctl.conf -
    manager_addr = "127.0.0.1"
    -manager_port = 12345
    -ca_cert = ""
    +先确定已经给tunasynctl写好config文件:`~/.config/tunasync/ctl.conf` +``` +manager_addr = "127.0.0.1" +manager_port = 12345 +ca_cert = "" +``` 接着 -
    $ tunasynctl disable -w [worker_id] [mirror_name]
    -$ tunasynctl flush
    -
  • 热重载worker.conf +``` +$ tunasynctl disable -w [worker_id] [mirror_name] +$ tunasynctl flush +``` + +---- + +* 热重载 `worker.conf` -$ tunasynctl reload -w [worker_id] +`$ tunasynctl reload -w [worker_id]` ---- -e.g. 删除test_workerelvish镜像: +e.g. 删除 `test_worker` 的 `elvish` 镜像: 1. 删除存放镜像的文件夹 -2. 删除worker.conf中对应的mirror段落 +2. 删除 `worker.conf` 中对应的 `mirror` 段落 3. 接着操作: -
    $ tunasynctl reload -w test_worker
    +
    +```
    +$ tunasynctl reload -w test_worker
     $ tunasynctl disable -w test_worker elvish
    -$ tunasynctl flush
    +$ tunasynctl flush +``` 4. (可选)最后删除日志文件夹里的日志 + ---- -
  • 删除worker +* 删除worker -$ tunasynctl rm-worker -w [worker_id] +`$ tunasynctl rm-worker -w [worker_id]` -e.g. $ tunasynctl rm-worker -w test_worker +e.g. `$ tunasynctl rm-worker -w test_worker` ---- -
  • 更新镜像的大小 - -由于du -s比较耗时,故镜像大小可直接由rsync的日志文件读出 +* 更新镜像的大小 + +`$ tunasynctl set-size -w [worker_id] [mirror_name] [size]` -$ tunasynctl set-size -w [worker_id] [mirror_name] [size] +其中,末尾的[size]参数,由操作者设定,或由某定时脚本生成 -其中,末尾的[size]参数,由操作者设定 +由于 `du -s` 比较耗时,故镜像大小可直接由rsync的日志文件读出