You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

304 lines
9.1 KiB

7 months ago
  1. # A sample TOML config file for SeaweedFS filer store
  2. # Used with "weed filer" or "weed server -filer"
  3. # Put this file to one of the location, with descending priority
  4. # ./filer.toml
  5. # $HOME/.seaweedfs/filer.toml
  6. # /etc/seaweedfs/filer.toml
  7. ####################################################
  8. # Customizable filer server options
  9. ####################################################
  10. [filer.options]
  11. # with http DELETE, by default the filer would check whether a folder is empty.
  12. # recursive_delete will delete all sub folders and files, similar to "rm -Rf"
  13. recursive_delete = false
  14. #max_file_name_length = 255
  15. ####################################################
  16. # The following are filer store options
  17. ####################################################
  18. [leveldb2]
  19. # local on disk, mostly for simple single-machine setup, fairly scalable
  20. # faster than previous leveldb, recommended.
  21. enabled = true
  22. dir = "./filerldb2" # directory to store level db files
  23. [leveldb3]
  24. # similar to leveldb2.
  25. # each bucket has its own meta store.
  26. enabled = false
  27. dir = "./filerldb3" # directory to store level db files
  28. [rocksdb]
  29. # local on disk, similar to leveldb
  30. # since it is using a C wrapper, you need to install rocksdb and build it by yourself
  31. enabled = false
  32. dir = "./filerrdb" # directory to store rocksdb files
  33. [sqlite]
  34. # local on disk, similar to leveldb
  35. enabled = false
  36. dbFile = "./filer.db" # sqlite db file
  37. [mysql] # or memsql, tidb
  38. # CREATE TABLE IF NOT EXISTS `filemeta` (
  39. # `dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field',
  40. # `name` VARCHAR(766) NOT NULL COMMENT 'directory or file name',
  41. # `directory` TEXT NOT NULL COMMENT 'full path to parent directory',
  42. # `meta` LONGBLOB,
  43. # PRIMARY KEY (`dirhash`, `name`)
  44. # ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
  45. enabled = false
  46. # dsn will take priority over "hostname, port, username, password, database".
  47. # [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN]
  48. dsn = "root@tcp(localhost:3306)/seaweedfs?collation=utf8mb4_bin"
  49. hostname = "localhost"
  50. port = 3306
  51. username = "root"
  52. password = ""
  53. database = "" # create or use an existing database
  54. connection_max_idle = 2
  55. connection_max_open = 100
  56. connection_max_lifetime_seconds = 0
  57. interpolateParams = false
  58. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  59. enableUpsert = true
  60. upsertQuery = """INSERT INTO `%s` (`dirhash`,`name`,`directory`,`meta`) VALUES (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
  61. [mysql2] # or memsql, tidb
  62. enabled = false
  63. createTable = """
  64. CREATE TABLE IF NOT EXISTS `%s` (
  65. `dirhash` BIGINT NOT NULL,
  66. `name` VARCHAR(766) NOT NULL,
  67. `directory` TEXT NOT NULL,
  68. `meta` LONGBLOB,
  69. PRIMARY KEY (`dirhash`, `name`)
  70. ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
  71. """
  72. hostname = "localhost"
  73. port = 3306
  74. username = "root"
  75. password = ""
  76. database = "" # create or use an existing database
  77. connection_max_idle = 2
  78. connection_max_open = 100
  79. connection_max_lifetime_seconds = 0
  80. interpolateParams = false
  81. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  82. enableUpsert = true
  83. upsertQuery = """INSERT INTO `%s` (`dirhash`,`name`,`directory`,`meta`) VALUES (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
  84. [postgres] # or cockroachdb, YugabyteDB
  85. # CREATE TABLE IF NOT EXISTS filemeta (
  86. # dirhash BIGINT,
  87. # name VARCHAR(65535),
  88. # directory VARCHAR(65535),
  89. # meta bytea,
  90. # PRIMARY KEY (dirhash, name)
  91. # );
  92. enabled = false
  93. hostname = "localhost"
  94. port = 5432
  95. username = "postgres"
  96. password = ""
  97. database = "postgres" # create or use an existing database
  98. schema = ""
  99. sslmode = "disable"
  100. connection_max_idle = 100
  101. connection_max_open = 100
  102. connection_max_lifetime_seconds = 0
  103. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  104. enableUpsert = true
  105. upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
  106. [postgres2]
  107. enabled = false
  108. createTable = """
  109. CREATE TABLE IF NOT EXISTS "%s" (
  110. dirhash BIGINT,
  111. name VARCHAR(65535),
  112. directory VARCHAR(65535),
  113. meta bytea,
  114. PRIMARY KEY (dirhash, name)
  115. );
  116. """
  117. hostname = "localhost"
  118. port = 5432
  119. username = "postgres"
  120. password = ""
  121. database = "postgres" # create or use an existing database
  122. schema = ""
  123. sslmode = "disable"
  124. connection_max_idle = 100
  125. connection_max_open = 100
  126. connection_max_lifetime_seconds = 0
  127. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  128. enableUpsert = true
  129. upsertQuery = """UPSERT INTO "%[1]s" (dirhash,name,directory,meta) VALUES($1,$2,$3,$4)"""
  130. [cassandra2]
  131. # CREATE TABLE filemeta (
  132. # dirhash bigint,
  133. # directory varchar,
  134. # name varchar,
  135. # meta blob,
  136. # PRIMARY KEY ((dirhash, directory), name)
  137. # ) WITH CLUSTERING ORDER BY (name ASC);
  138. enabled = false
  139. keyspace = "seaweedfs"
  140. hosts = [
  141. "localhost:9042",
  142. ]
  143. username = ""
  144. password = ""
  145. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  146. superLargeDirectories = []
  147. # Name of the datacenter local to this filer, used as host selection fallback.
  148. localDC = ""
  149. # Gocql connection timeout, default: 600ms
  150. connection_timeout_millisecond = 600
  151. [hbase]
  152. enabled = false
  153. zkquorum = ""
  154. table = "seaweedfs"
  155. [redis2]
  156. enabled = false
  157. address = "localhost:6379"
  158. password = ""
  159. database = 0
  160. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  161. superLargeDirectories = []
  162. [redis2_sentinel]
  163. enabled = false
  164. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  165. masterName = "master"
  166. username = ""
  167. password = ""
  168. database = 0
  169. [redis_cluster2]
  170. enabled = false
  171. addresses = [
  172. "localhost:30001",
  173. "localhost:30002",
  174. "localhost:30003",
  175. "localhost:30004",
  176. "localhost:30005",
  177. "localhost:30006",
  178. ]
  179. password = ""
  180. # allows reads from slave servers or the master, but all writes still go to the master
  181. readOnly = false
  182. # automatically use the closest Redis server for reads
  183. routeByLatency = false
  184. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  185. superLargeDirectories = []
  186. [etcd]
  187. enabled = false
  188. servers = "localhost:2379"
  189. username = ""
  190. password = ""
  191. key_prefix = "seaweedfs."
  192. timeout = "3s"
  193. # Set the CA certificate path
  194. tls_ca_file=""
  195. # Set the client certificate path
  196. tls_client_crt_file=""
  197. # Set the client private key path
  198. tls_client_key_file=""
  199. [mongodb]
  200. enabled = false
  201. uri = "mongodb://localhost:27017"
  202. username = ""
  203. password = ""
  204. ssl = false
  205. ssl_ca_file = ""
  206. ssl_cert_file = ""
  207. ssl_key_file = ""
  208. insecure_skip_verify = false
  209. option_pool_size = 0
  210. database = "seaweedfs"
  211. [elastic7]
  212. enabled = false
  213. servers = [
  214. "http://localhost1:9200",
  215. "http://localhost2:9200",
  216. "http://localhost3:9200",
  217. ]
  218. username = ""
  219. password = ""
  220. sniff_enabled = false
  221. healthcheck_enabled = false
  222. # increase the value is recommend, be sure the value in Elastic is greater or equal here
  223. index.max_result_window = 10000
  224. [arangodb] # in development dont use it
  225. enabled = false
  226. db_name = "seaweedfs"
  227. servers=["http://localhost:8529"] # list of servers to connect to
  228. # only basic auth supported for now
  229. username=""
  230. password=""
  231. # skip tls cert validation
  232. insecure_skip_verify = true
  233. [ydb] # https://ydb.tech/
  234. enabled = false
  235. dsn = "grpc://localhost:2136?database=/local"
  236. prefix = "seaweedfs"
  237. useBucketPrefix = true # Fast Bucket Deletion
  238. poolSizeLimit = 50
  239. dialTimeOut = 10
  240. # Authenticate produced with one of next environment variables:
  241. # YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS=<path/to/sa_key_file> — used service account key file by path
  242. # YDB_ANONYMOUS_CREDENTIALS="1" — used for authenticate with anonymous access. Anonymous access needs for connect to testing YDB installation
  243. # YDB_METADATA_CREDENTIALS="1" — used metadata service for authenticate to YDB from yandex cloud virtual machine or from yandex function
  244. # YDB_ACCESS_TOKEN_CREDENTIALS=<access_token> — used for authenticate to YDB with short-life access token. For example, access token may be IAM token
  245. ##########################
  246. ##########################
  247. # To add path-specific filer store:
  248. #
  249. # 1. Add a name following the store type separated by a dot ".". E.g., cassandra2.tmp
  250. # 2. Add a location configuration. E.g., location = "/tmp/"
  251. # 3. Copy and customize all other configurations.
  252. # Make sure they are not the same if using the same store type!
  253. # 4. Set enabled to true
  254. #
  255. # The following is just using redis as an example
  256. ##########################
  257. [redis2.tmp]
  258. enabled = false
  259. location = "/tmp/"
  260. address = "localhost:6379"
  261. password = ""
  262. database = 1
  263. [tikv]
  264. enabled = false
  265. # If you have many pd address, use ',' split then:
  266. # pdaddrs = "pdhost1:2379, pdhost2:2379, pdhost3:2379"
  267. pdaddrs = "localhost:2379"
  268. # Concurrency for TiKV delete range
  269. deleterange_concurrency = 1
  270. # Enable 1PC
  271. enable_1pc = false
  272. # Set the CA certificate path
  273. ca_path=""
  274. # Set the certificate path
  275. cert_path=""
  276. # Set the private key path
  277. key_path=""
  278. # The name list used to verify the cn name
  279. verify_cn=""