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.

368 lines
11 KiB

3 years ago
3 years ago
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. [redis_lua]
  187. enabled = false
  188. address = "localhost:6379"
  189. password = ""
  190. database = 0
  191. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  192. superLargeDirectories = []
  193. [redis_lua_sentinel]
  194. enabled = false
  195. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  196. masterName = "master"
  197. username = ""
  198. password = ""
  199. database = 0
  200. [redis_lua_cluster]
  201. enabled = false
  202. addresses = [
  203. "localhost:30001",
  204. "localhost:30002",
  205. "localhost:30003",
  206. "localhost:30004",
  207. "localhost:30005",
  208. "localhost:30006",
  209. ]
  210. password = ""
  211. # allows reads from slave servers or the master, but all writes still go to the master
  212. readOnly = false
  213. # automatically use the closest Redis server for reads
  214. routeByLatency = false
  215. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  216. superLargeDirectories = []
  217. [redis3] # beta
  218. enabled = false
  219. address = "localhost:6379"
  220. password = ""
  221. database = 0
  222. [redis3_sentinel]
  223. enabled = false
  224. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  225. masterName = "master"
  226. username = ""
  227. password = ""
  228. database = 0
  229. [redis_cluster3] # beta
  230. enabled = false
  231. addresses = [
  232. "localhost:30001",
  233. "localhost:30002",
  234. "localhost:30003",
  235. "localhost:30004",
  236. "localhost:30005",
  237. "localhost:30006",
  238. ]
  239. password = ""
  240. # allows reads from slave servers or the master, but all writes still go to the master
  241. readOnly = false
  242. # automatically use the closest Redis server for reads
  243. routeByLatency = false
  244. [etcd]
  245. enabled = false
  246. servers = "localhost:2379"
  247. username = ""
  248. password = ""
  249. key_prefix = "seaweedfs."
  250. timeout = "3s"
  251. # Set the CA certificate path
  252. tls_ca_file=""
  253. # Set the client certificate path
  254. tls_client_crt_file=""
  255. # Set the client private key path
  256. tls_client_key_file=""
  257. [mongodb]
  258. enabled = false
  259. uri = "mongodb://localhost:27017"
  260. username = ""
  261. password = ""
  262. ssl = false
  263. ssl_ca_file = ""
  264. ssl_cert_file = ""
  265. ssl_key_file = ""
  266. insecure_skip_verify = false
  267. option_pool_size = 0
  268. database = "seaweedfs"
  269. [elastic7]
  270. enabled = false
  271. servers = [
  272. "http://localhost1:9200",
  273. "http://localhost2:9200",
  274. "http://localhost3:9200",
  275. ]
  276. username = ""
  277. password = ""
  278. sniff_enabled = false
  279. healthcheck_enabled = false
  280. # increase the value is recommend, be sure the value in Elastic is greater or equal here
  281. index.max_result_window = 10000
  282. [arangodb] # in development dont use it
  283. enabled = false
  284. db_name = "seaweedfs"
  285. servers=["http://localhost:8529"] # list of servers to connect to
  286. # only basic auth supported for now
  287. username=""
  288. password=""
  289. # skip tls cert validation
  290. insecure_skip_verify = true
  291. [ydb] # https://ydb.tech/
  292. enabled = false
  293. dsn = "grpc://localhost:2136?database=/local"
  294. prefix = "seaweedfs"
  295. useBucketPrefix = true # Fast Bucket Deletion
  296. poolSizeLimit = 50
  297. dialTimeOut = 10
  298. # Authenticate produced with one of next environment variables:
  299. # YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS=<path/to/sa_key_file> — used service account key file by path
  300. # YDB_ANONYMOUS_CREDENTIALS="1" — used for authenticate with anonymous access. Anonymous access needs for connect to testing YDB installation
  301. # YDB_METADATA_CREDENTIALS="1" — used metadata service for authenticate to YDB from yandex cloud virtual machine or from yandex function
  302. # YDB_ACCESS_TOKEN_CREDENTIALS=<access_token> — used for authenticate to YDB with short-life access token. For example, access token may be IAM token
  303. ##########################
  304. ##########################
  305. # To add path-specific filer store:
  306. #
  307. # 1. Add a name following the store type separated by a dot ".". E.g., cassandra.tmp
  308. # 2. Add a location configuration. E.g., location = "/tmp/"
  309. # 3. Copy and customize all other configurations.
  310. # Make sure they are not the same if using the same store type!
  311. # 4. Set enabled to true
  312. #
  313. # The following is just using redis as an example
  314. ##########################
  315. [redis2.tmp]
  316. enabled = false
  317. location = "/tmp/"
  318. address = "localhost:6379"
  319. password = ""
  320. database = 1
  321. [tikv]
  322. enabled = false
  323. # If you have many pd address, use ',' split then:
  324. # pdaddrs = "pdhost1:2379, pdhost2:2379, pdhost3:2379"
  325. pdaddrs = "localhost:2379"
  326. # Concurrency for TiKV delete range
  327. deleterange_concurrency = 1
  328. # Enable 1PC
  329. enable_1pc = false
  330. # Set the CA certificate path
  331. ca_path=""
  332. # Set the certificate path
  333. cert_path=""
  334. # Set the private key path
  335. key_path=""
  336. # The name list used to verify the cn name
  337. verify_cn=""