Volumes and Files

81 views
Skip to first unread message

Tim D

unread,
Apr 7, 2015, 6:39:37 PM4/7/15
to weed-fil...@googlegroups.com
Hello,

I have a question about volume replication.

Here is the example on the weed-fs page :

1. start weed master, and optionally specify the default replication type

  ./weed master -defaultReplicationType=001

2. start volume servers as this:

 ./weed volume -port=8081 -dir=/tmp/1 -max=100
 
./weed volume -port=8082 -dir=/tmp/2 -max=100
 
./weed volume -port=8083 -dir=/tmp/3 -max=100


When  a file is stored it returns a volume number and file id, such as "1,2710683d0293"

I am not absolutely positive, but this id "1,2710683d0293"  is stored possibly in a database such as :

file_name
weedfs-id

Now the above example has 3 volumes for replication, if volume 1 goes down, then the file has been replicated on the other 2 servers.

How do you retrieve the file , because the file_id is "1,2710683d0293"  .. It appears the volume replicas use different directories, and the file_id "1,2710683d0293" would be associate to only one of the volume replicas..

It seems to me, each volume replica would point to a directory , but have the same volume number.

Can you please explain.






Chris Lu

unread,
Apr 7, 2015, 9:31:38 PM4/7/15
to weed-fil...@googlegroups.com
I think you are confusing volume with volume server. In this example, there are 3 volume servers, each server can have maximum 100 volumes. 

In "1,2710683d0293", the file is stored on volume 1, which can be on any one volume server.
--
You received this message because you are subscribed to the Google Groups "Seaweed File System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weed-file-syst...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages