master.toml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Put this file to one of the location, with descending priority
  2. # ./master.toml
  3. # $HOME/.seaweedfs/master.toml
  4. # /etc/seaweedfs/master.toml
  5. # this file is read by master
  6. [master.maintenance]
  7. # periodically run these scripts are the same as running them from 'weed shell'
  8. scripts = """
  9. lock
  10. ec.encode -fullPercent=95 -quietFor=1h
  11. ec.rebuild -force
  12. ec.balance -force
  13. volume.deleteEmpty -quietFor=24h -force
  14. volume.balance -force
  15. volume.fix.replication
  16. unlock
  17. """
  18. sleep_minutes = 17 # sleep minutes between each script execution
  19. [master.filer]
  20. default = "localhost:8888" # used by maintenance scripts if the scripts needs to use fs related commands
  21. [master.sequencer]
  22. type = "raft" # Choose [raft|etcd|snowflake] type for storing the file id sequence
  23. # when sequencer.type = etcd, set listen client urls of etcd cluster that store file id sequence
  24. # example : http://127.0.0.1:2379,http://127.0.0.1:2389
  25. sequencer_etcd_urls = "http://127.0.0.1:2379"
  26. # when sequencer.type = snowflake, the snowflake id must be different from other masters
  27. sequencer_snowflake_id = 0 # any number between 1~1023
  28. # configurations for tiered cloud storage
  29. # old volumes are transparently moved to cloud for cost efficiency
  30. [storage.backend]
  31. [storage.backend.s3.default]
  32. enabled = false
  33. aws_access_key_id = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
  34. aws_secret_access_key = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
  35. region = "us-east-2"
  36. bucket = "your_bucket_name" # an existing bucket
  37. endpoint = ""
  38. # create this number of logical volumes if no more writable volumes
  39. # count_x means how many copies of data.
  40. # e.g.:
  41. # 000 has only one copy, copy_1
  42. # 010 and 001 has two copies, copy_2
  43. # 011 has only 3 copies, copy_3
  44. [master.volume_growth]
  45. copy_1 = 7 # create 1 x 7 = 7 actual volumes
  46. copy_2 = 6 # create 2 x 6 = 12 actual volumes
  47. copy_3 = 3 # create 3 x 3 = 9 actual volumes
  48. copy_other = 1 # create n x 1 = n actual volumes
  49. # configuration flags for replication
  50. [master.replication]
  51. # any replication counts should be considered minimums. If you specify 010 and
  52. # have 3 different racks, that's still considered writable. Writes will still
  53. # try to replicate to all available volumes. You should only use this option
  54. # if you are doing your own replication or periodic sync of volumes.
  55. treat_replication_as_minimums = false