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.

360 lines
10 KiB

3 years ago
3 years 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. [cassandra]
  131. # CREATE TABLE filemeta (
  132. # directory varchar,
  133. # name varchar,
  134. # meta blob,
  135. # PRIMARY KEY (directory, name)
  136. # ) WITH CLUSTERING ORDER BY (name ASC);
  137. enabled = false
  138. keyspace = "seaweedfs"
  139. hosts = [
  140. "localhost:9042",
  141. ]
  142. username = ""
  143. password = ""
  144. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  145. superLargeDirectories = []
  146. # Name of the datacenter local to this filer, used as host selection fallback.
  147. localDC = ""
  148. # Gocql connection timeout, default: 600ms
  149. connection_timeout_millisecond = 600
  150. [hbase]
  151. enabled = false
  152. zkquorum = ""
  153. table = "seaweedfs"
  154. [redis2]
  155. enabled = false
  156. address = "localhost:6379"
  157. password = ""
  158. database = 0
  159. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  160. superLargeDirectories = []
  161. [redis2_sentinel]
  162. enabled = false
  163. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  164. masterName = "master"
  165. username = ""
  166. password = ""
  167. database = 0
  168. [redis_cluster2]
  169. enabled = false
  170. addresses = [
  171. "localhost:30001",
  172. "localhost:30002",
  173. "localhost:30003",
  174. "localhost:30004",
  175. "localhost:30005",
  176. "localhost:30006",
  177. ]
  178. password = ""
  179. # allows reads from slave servers or the master, but all writes still go to the master
  180. readOnly = false
  181. # automatically use the closest Redis server for reads
  182. routeByLatency = false
  183. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  184. superLargeDirectories = []
  185. [redis_lua]
  186. enabled = false
  187. address = "localhost:6379"
  188. password = ""
  189. database = 0
  190. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  191. superLargeDirectories = []
  192. [redis_lua_sentinel]
  193. enabled = false
  194. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  195. masterName = "master"
  196. username = ""
  197. password = ""
  198. database = 0
  199. [redis_lua_cluster]
  200. enabled = false
  201. addresses = [
  202. "localhost:30001",
  203. "localhost:30002",
  204. "localhost:30003",
  205. "localhost:30004",
  206. "localhost:30005",
  207. "localhost:30006",
  208. ]
  209. password = ""
  210. # allows reads from slave servers or the master, but all writes still go to the master
  211. readOnly = false
  212. # automatically use the closest Redis server for reads
  213. routeByLatency = false
  214. # This changes the data layout. Only add new directories. Removing/Updating will cause data loss.
  215. superLargeDirectories = []
  216. [redis3] # beta
  217. enabled = false
  218. address = "localhost:6379"
  219. password = ""
  220. database = 0
  221. [redis3_sentinel]
  222. enabled = false
  223. addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"]
  224. masterName = "master"
  225. username = ""
  226. password = ""
  227. database = 0
  228. [redis_cluster3] # beta
  229. enabled = false
  230. addresses = [
  231. "localhost:30001",
  232. "localhost:30002",
  233. "localhost:30003",
  234. "localhost:30004",
  235. "localhost:30005",
  236. "localhost:30006",
  237. ]
  238. password = ""
  239. # allows reads from slave servers or the master, but all writes still go to the master
  240. readOnly = false
  241. # automatically use the closest Redis server for reads
  242. routeByLatency = false
  243. [etcd]
  244. enabled = false
  245. servers = "localhost:2379"
  246. username = ""
  247. password = ""
  248. key_prefix = "seaweedfs."
  249. timeout = "3s"
  250. # Set the CA certificate path
  251. tls_ca_file=""
  252. # Set the client certificate path
  253. tls_client_crt_file=""
  254. # Set the client private key path
  255. tls_client_key_file=""
  256. [mongodb]
  257. enabled = false
  258. uri = "mongodb://localhost:27017"
  259. option_pool_size = 0
  260. database = "seaweedfs"
  261. [elastic7]
  262. enabled = false
  263. servers = [
  264. "http://localhost1:9200",
  265. "http://localhost2:9200",
  266. "http://localhost3:9200",
  267. ]
  268. username = ""
  269. password = ""
  270. sniff_enabled = false
  271. healthcheck_enabled = false
  272. # increase the value is recommend, be sure the value in Elastic is greater or equal here
  273. index.max_result_window = 10000
  274. [arangodb] # in development dont use it
  275. enabled = false
  276. db_name = "seaweedfs"
  277. servers=["http://localhost:8529"] # list of servers to connect to
  278. # only basic auth supported for now
  279. username=""
  280. password=""
  281. # skip tls cert validation
  282. insecure_skip_verify = true
  283. [ydb] # https://ydb.tech/
  284. enabled = false
  285. dsn = "grpc://localhost:2136?database=/local"
  286. prefix = "seaweedfs"
  287. useBucketPrefix = true # Fast Bucket Deletion
  288. poolSizeLimit = 50
  289. dialTimeOut = 10
  290. # Authenticate produced with one of next environment variables:
  291. # YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS=<path/to/sa_key_file> — used service account key file by path
  292. # YDB_ANONYMOUS_CREDENTIALS="1" — used for authenticate with anonymous access. Anonymous access needs for connect to testing YDB installation
  293. # YDB_METADATA_CREDENTIALS="1" — used metadata service for authenticate to YDB from yandex cloud virtual machine or from yandex function
  294. # YDB_ACCESS_TOKEN_CREDENTIALS=<access_token> — used for authenticate to YDB with short-life access token. For example, access token may be IAM token
  295. ##########################
  296. ##########################
  297. # To add path-specific filer store:
  298. #
  299. # 1. Add a name following the store type separated by a dot ".". E.g., cassandra.tmp
  300. # 2. Add a location configuration. E.g., location = "/tmp/"
  301. # 3. Copy and customize all other configurations.
  302. # Make sure they are not the same if using the same store type!
  303. # 4. Set enabled to true
  304. #
  305. # The following is just using redis as an example
  306. ##########################
  307. [redis2.tmp]
  308. enabled = false
  309. location = "/tmp/"
  310. address = "localhost:6379"
  311. password = ""
  312. database = 1
  313. [tikv]
  314. enabled = false
  315. # If you have many pd address, use ',' split then:
  316. # pdaddrs = "pdhost1:2379, pdhost2:2379, pdhost3:2379"
  317. pdaddrs = "localhost:2379"
  318. # Concurrency for TiKV delete range
  319. deleterange_concurrency = 1
  320. # Enable 1PC
  321. enable_1pc = false
  322. # Set the CA certificate path
  323. ca_path=""
  324. # Set the certificate path
  325. cert_path=""
  326. # Set the private key path
  327. key_path=""
  328. # The name list used to verify the cn name
  329. verify_cn=""