Question about initializing weedfs volume servers (disks) and fid

259 Views Asked by At

I have two question about seaweedfs:

  1. in each server I have 10 disks, How can I run weedfs volume servee on them? should I define 10 times "-dir=" in front of "./weed volume -max=100 -mserver=" or I should make systemd unit file for each disk? fore example: for sdb ExecStart=/home/weedfs/weed volume -max=100 -mserver=192.168.200.20:9333 -port=8080 -dataCenter=dc1 -dir="/srv/sdb/data" for sdc ExecStart=/home/weedfs/weed volume -max=100 -mserver=192.168.200.20:9333 -port=8080 -dataCenter=dc1 -dir="/srv/sdc/data" What is the best solution?

  2. Can I create and define fid myself instead of asking master api? forexample instead of this steps:

a)curl http://localhost:9333/dir/assign
{"fid":"14,8e3cf10b7811f43a542cfa34","url":"192.168.200.20:8080","publicUrl":"192.168.200.20:8080","count":1}
b)curl -F file=@/home/eitaa/weedfs/weed http://192.168.200.20:8080/14,8e3cf10b7811f43a542cfa34

directly I want to generating fid (I mean this part ",8e3cf10b7811f43a542cfa34" ) with desired volume id (eg:"8") and uploading file? Or I should use Master api (Assign a file key)?

1

There are 1 best solutions below

0
On
  1. Either way. Pick the one that is easier for you.
  2. Possibly. You may need to run volume with "-index=leveldb" to optimize memory usage, in case the file keys are not monotonically increasing.