filer.toml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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. enable_tls = false
  50. ca_crt = "" # ca.crt dir when enable_tls set true
  51. client_crt = "" # mysql client.crt dir when enable_tls set true
  52. client_key = "" # mysql client.key dir when enable_tls set true
  53. hostname = "localhost"
  54. port = 3306
  55. username = "root"
  56. password = ""
  57. database = "" # create or use an existing database
  58. connection_max_idle = 2
  59. connection_max_open = 100
  60. connection_max_lifetime_seconds = 0
  61. interpolateParams = false
  62. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  63. enableUpsert = true
  64. upsertQuery = """INSERT INTO `%s` (`dirhash`,`name`,`directory`,`meta`) VALUES (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
  65. [mysql2] # or memsql, tidb
  66. enabled = false
  67. createTable = """
  68. CREATE TABLE IF NOT EXISTS `%s` (
  69. `dirhash` BIGINT NOT NULL,
  70. `name` VARCHAR(766) NOT NULL,
  71. `directory` TEXT NOT NULL,
  72. `meta` LONGBLOB,
  73. PRIMARY KEY (`dirhash`, `name`)
  74. ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
  75. """
  76. hostname = "localhost"
  77. port = 3306
  78. username = "root"
  79. password = ""
  80. database = "" # create or use an existing database
  81. connection_max_idle = 2
  82. connection_max_open = 100
  83. connection_max_lifetime_seconds = 0
  84. interpolateParams = false
  85. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  86. enableUpsert = true
  87. upsertQuery = """INSERT INTO `%s` (`dirhash`,`name`,`directory`,`meta`) VALUES (?,?,?,?) AS `new` ON DUPLICATE KEY UPDATE `meta` = `new`.`meta`"""
  88. [postgres] # or cockroachdb, YugabyteDB
  89. # CREATE TABLE IF NOT EXISTS filemeta (
  90. # dirhash BIGINT,
  91. # name VARCHAR(65535),
  92. # directory VARCHAR(65535),
  93. # meta bytea,
  94. # PRIMARY KEY (dirhash, name)
  95. # );
  96. enabled = false
  97. hostname = "localhost"
  98. port = 5432
  99. username = "postgres"
  100. password = ""
  101. database = "postgres" # create or use an existing database
  102. schema = ""
  103. sslmode = "disable"
  104. # SSL certificate options for secure connections
  105. # For sslmode=verify-full, uncomment and configure the following:
  106. # sslcert = "/path/to/client.crt" # client certificate file
  107. # sslkey = "/path/to/client.key" # client private key file
  108. # sslrootcert = "/path/to/ca.crt" # CA certificate file
  109. # sslcrl = "/path/to/client.crl" # Certificate Revocation List (CRL) (optional)
  110. connection_max_idle = 100
  111. connection_max_open = 100
  112. connection_max_lifetime_seconds = 0
  113. # Set to true when using PgBouncer connection pooler
  114. pgbouncer_compatible = false
  115. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  116. enableUpsert = true
  117. upsertQuery = """
  118. INSERT INTO "%[1]s" (dirhash, name, directory, meta)
  119. VALUES($1, $2, $3, $4)
  120. ON CONFLICT (dirhash, name) DO UPDATE SET
  121. directory=EXCLUDED.directory,
  122. meta=EXCLUDED.meta
  123. """
  124. [postgres2]
  125. enabled = false
  126. createTable = """
  127. CREATE TABLE IF NOT EXISTS "%s" (
  128. dirhash BIGINT,
  129. name VARCHAR(65535),
  130. directory VARCHAR(65535),
  131. meta bytea,
  132. PRIMARY KEY (dirhash, name)
  133. );
  134. """
  135. hostname = "localhost"
  136. port = 5432
  137. username = "postgres"
  138. password = ""
  139. database = "postgres" # create or use an existing database
  140. schema = ""
  141. sslmode = "disable"
  142. # SSL certificate options for secure connections
  143. # For sslmode=verify-full, uncomment and configure the following:
  144. # sslcert = "/path/to/client.crt" # client certificate file
  145. # sslkey = "/path/to/client.key" # client private key file
  146. # sslrootcert = "/path/to/ca.crt" # CA certificate file
  147. # sslcrl = "/path/to/client.crl" # Certificate Revocation List (CRL) (optional)
  148. connection_max_idle = 100
  149. connection_max_open = 100
  150. connection_max_lifetime_seconds = 0
  151. # Set to true when using PgBouncer connection pooler
  152. pgbouncer_compatible = false
  153. # if insert/upsert failing, you can disable upsert or update query syntax to match your RDBMS syntax:
  154. enableUpsert = true
  155. upsertQuery = """
  156. INSERT INTO "%[1]s" (dirhash, name, directory, meta)
  157. VALUES($1, $2, $3, $4)
  158. ON CONFLICT (dirhash, name) DO UPDATE SET
  159. directory=EXCLUDED.directory,
  160. meta=EXCLUDED.meta
  161. """
  162. [cassandra2]
  163. # CREATE TABLE filemeta (
  164. # dirhash bigint,
  165. # directory varchar,
  166. # name varchar,
  167. # meta blob,
  168. # PRIMARY KEY ((dirhash, directory), name)
  169. # ) WITH CLUSTERING ORDER BY (name ASC);
  170. enabled = false
  171. keyspace = "seaweedfs"
  172. hosts = [
  173. "localhost:9042",
  174. ]
  175. username = ""
  176. password = ""
  177. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  178. superLargeDirectories = []
  179. # Name of the datacenter local to this filer, used as host selection fallback.
  180. localDC = ""
  181. # Gocql connection timeout, default: 600ms
  182. connection_timeout_millisecond = 600
  183. [hbase]
  184. enabled = false
  185. zkquorum = ""
  186. table = "seaweedfs"
  187. [redis2]
  188. enabled = false
  189. address = "localhost:6379"
  190. password = ""
  191. database = 0
  192. enable_tls = false
  193. ca_cert_path = ""
  194. client_cert_path = ""
  195. client_key_path = ""
  196. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  197. superLargeDirectories = []
  198. [redis2_sentinel]
  199. enabled = false
  200. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  201. masterName = "master"
  202. username = ""
  203. password = ""
  204. database = 0
  205. enable_tls = false
  206. ca_cert_path = ""
  207. client_cert_path = ""
  208. client_key_path = ""
  209. [redis_cluster2]
  210. enabled = false
  211. addresses = [
  212. "localhost:30001",
  213. "localhost:30002",
  214. "localhost:30003",
  215. "localhost:30004",
  216. "localhost:30005",
  217. "localhost:30006",
  218. ]
  219. password = ""
  220. enable_tls = false
  221. ca_cert_path = ""
  222. client_cert_path = ""
  223. client_key_path = ""
  224. # allows reads from slave servers or the master, but all writes still go to the master
  225. readOnly = false
  226. # automatically use the closest Redis server for reads
  227. routeByLatency = false
  228. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  229. superLargeDirectories = []
  230. # The following lua redis stores uses lua to ensure atomicity
  231. [redis_lua]
  232. enabled = false
  233. address = "localhost:6379"
  234. password = ""
  235. database = 0
  236. enable_tls = false
  237. ca_cert_path = ""
  238. client_cert_path = ""
  239. client_key_path = ""
  240. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  241. superLargeDirectories = []
  242. [redis_lua_sentinel]
  243. enabled = false
  244. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  245. masterName = "master"
  246. username = ""
  247. password = ""
  248. database = 0
  249. enable_tls = false
  250. ca_cert_path = ""
  251. client_cert_path = ""
  252. client_key_path = ""
  253. [redis_lua_cluster]
  254. enabled = false
  255. addresses = [
  256. "localhost:30001",
  257. "localhost:30002",
  258. "localhost:30003",
  259. "localhost:30004",
  260. "localhost:30005",
  261. "localhost:30006",
  262. ]
  263. password = ""
  264. enable_tls = false
  265. ca_cert_path = ""
  266. client_cert_path = ""
  267. client_key_path = ""
  268. # allows reads from slave servers or the master, but all writes still go to the master
  269. readOnly = false
  270. # automatically use the closest Redis server for reads
  271. routeByLatency = false
  272. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  273. superLargeDirectories = []
  274. [etcd]
  275. enabled = false
  276. servers = "localhost:2379"
  277. username = ""
  278. password = ""
  279. key_prefix = "seaweedfs."
  280. timeout = "3s"
  281. # Set the CA certificate path
  282. tls_ca_file=""
  283. # Set the client certificate path
  284. tls_client_crt_file=""
  285. # Set the client private key path
  286. tls_client_key_file=""
  287. [mongodb]
  288. enabled = false
  289. uri = "mongodb://localhost:27017"
  290. username = ""
  291. password = ""
  292. ssl = false
  293. ssl_ca_file = ""
  294. ssl_cert_file = ""
  295. ssl_key_file = ""
  296. insecure_skip_verify = false
  297. option_pool_size = 0
  298. database = "seaweedfs"
  299. [elastic7]
  300. enabled = false
  301. servers = [
  302. "http://localhost1:9200",
  303. "http://localhost2:9200",
  304. "http://localhost3:9200",
  305. ]
  306. username = ""
  307. password = ""
  308. sniff_enabled = false
  309. healthcheck_enabled = false
  310. # increase the value is recommend, be sure the value in Elastic is greater or equal here
  311. index.max_result_window = 10000
  312. [arangodb] # in development dont use it
  313. enabled = false
  314. db_name = "seaweedfs"
  315. servers=["http://localhost:8529"] # list of servers to connect to
  316. # only basic auth supported for now
  317. username=""
  318. password=""
  319. # skip tls cert validation
  320. insecure_skip_verify = true
  321. [ydb] # https://ydb.tech/
  322. enabled = false
  323. dsn = "grpc://localhost:2136?database=/local"
  324. prefix = "seaweedfs"
  325. useBucketPrefix = true # Fast Bucket Deletion
  326. poolSizeLimit = 50
  327. dialTimeOut = 10
  328. # Authenticate produced with one of next environment variables:
  329. # YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS=<path/to/sa_key_file> — used service account key file by path
  330. # YDB_ANONYMOUS_CREDENTIALS="1" — used for authenticate with anonymous access. Anonymous access needs for connect to testing YDB installation
  331. # YDB_METADATA_CREDENTIALS="1" — used metadata service for authenticate to YDB from yandex cloud virtual machine or from yandex function
  332. # YDB_ACCESS_TOKEN_CREDENTIALS=<access_token> — used for authenticate to YDB with short-life access token. For example, access token may be IAM token
  333. ##########################
  334. ##########################
  335. # To add path-specific filer store:
  336. #
  337. # 1. Add a name following the store type separated by a dot ".". E.g., cassandra2.tmp
  338. # 2. Add a location configuration. E.g., location = "/tmp/"
  339. # 3. Copy and customize all other configurations.
  340. # Make sure they are not the same if using the same store type!
  341. # 4. Set enabled to true
  342. #
  343. # The following is just using redis as an example
  344. ##########################
  345. [redis2.tmp]
  346. enabled = false
  347. location = "/tmp/"
  348. address = "localhost:6379"
  349. password = ""
  350. database = 1
  351. [tikv]
  352. enabled = false
  353. # If you have many pd address, use ',' split then:
  354. # pdaddrs = "pdhost1:2379, pdhost2:2379, pdhost3:2379"
  355. pdaddrs = "localhost:2379"
  356. # Concurrency for TiKV delete range
  357. deleterange_concurrency = 1
  358. # Enable 1PC
  359. enable_1pc = false
  360. # Set the CA certificate path
  361. ca_path=""
  362. # Set the certificate path
  363. cert_path=""
  364. # Set the private key path
  365. key_path=""
  366. # The name list used to verify the cn name
  367. verify_cn=""
  368. [tarantool]
  369. address = "localhost:3301"
  370. user = "guest"
  371. password = ""
  372. timeout = "5s"
  373. maxReconnects = 1000