One way to resolve this is here.

Reserve a set of file keys, for example, 5

Save the 5 versions of the image to the volume server. The urls for each image can be:

  1. http://<url>:<port>/3,01637037d6
  2. http://<url>:<port>/3,01637037d6_1
  3. http://<url>:<port>/3,01637037d6_2
  4. http://<url>:<port>/3,01637037d6_3
  5. http://<url>:<port>/3,01637037d6_4

    The wrong way to send it:

    The simple way is to front all master and volume servers with firewall.

    The following white list option is deprecated. Please follow https://github.com/chrislusf/seaweedfs/wiki/Security-Overview

    1. weed master -whiteList="::1,127.0.0.1"
    2. weed volume -whiteList="::1,127.0.0.1"
    3. # "::1" is for IP v6 localhost.
    1. weed master -mdir="/tmp/mdata" -defaultReplication="001" -ip="localhost" -port=9334
    2. weed volume -dir=/tmp/vol1/ -mserver="localhost:9334" -ip="localhost" -port=8081
    3. weed volume -dir=/tmp/vol2/ -mserver="localhost:9334" -ip="localhost" -port=8082
    4. weed volume -dir=/tmp/vol3/ -mserver="localhost:9334" -ip="localhost" -port=8083

    stop all of them

    move vol3/* to vol1 and vol2

    it is ok to move x.dat and x.idx from one volumeserver to another volumeserver,because they are exactly the same.it can be checked by md5.

    1. md5 vol1/1.dat vol2/1.dat
    2. MD5 (vol2/1.dat) = c1a49a0ee550b44fef9f8ae9e55215c7
    3. md5 vol1/1.idx vol2/1.idx
    4. MD5 (vol1/1.idx) = b9edc95795dfb3b0f9063c9cc9ba8095
    5. MD5 (vol2/1.idx) = b9edc95795dfb3b0f9063c9cc9ba8095
    1. ls vol1 vol2 vol3
    2. vol1:
    3. 1.dat 1.idx 2.dat 2.idx 3.dat 3.idx 4.dat 4.idx 5.dat 5.idx 6.dat 6.idx
    4. vol2:
    5. vol3:

    so we finished moving data of localhost:8083 to localhost:8081/localhost:8082