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.

354 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. [mongodb]
  251. enabled = false
  252. uri = "mongodb://localhost:27017"
  253. option_pool_size = 0
  254. database = "seaweedfs"
  255. [elastic7]
  256. enabled = false
  257. servers = [
  258. "http://localhost1:9200",
  259. "http://localhost2:9200",
  260. "http://localhost3:9200",
  261. ]
  262. username = ""
  263. password = ""
  264. sniff_enabled = false
  265. healthcheck_enabled = false
  266. # increase the value is recommend, be sure the value in Elastic is greater or equal here
  267. index.max_result_window = 10000
  268. [arangodb] # in development dont use it
  269. enabled = false
  270. db_name = "seaweedfs"
  271. servers=["http://localhost:8529"] # list of servers to connect to
  272. # only basic auth supported for now
  273. username=""
  274. password=""
  275. # skip tls cert validation
  276. insecure_skip_verify = true
  277. [ydb] # https://ydb.tech/
  278. enabled = false
  279. dsn = "grpc://localhost:2136?database=/local"
  280. prefix = "seaweedfs"
  281. useBucketPrefix = true # Fast Bucket Deletion
  282. poolSizeLimit = 50
  283. dialTimeOut = 10
  284. # Authenticate produced with one of next environment variables:
  285. # YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS=<path/to/sa_key_file> — used service account key file by path
  286. # YDB_ANONYMOUS_CREDENTIALS="1" — used for authenticate with anonymous access. Anonymous access needs for connect to testing YDB installation
  287. # YDB_METADATA_CREDENTIALS="1" — used metadata service for authenticate to YDB from yandex cloud virtual machine or from yandex function
  288. # YDB_ACCESS_TOKEN_CREDENTIALS=<access_token> — used for authenticate to YDB with short-life access token. For example, access token may be IAM token
  289. ##########################
  290. ##########################
  291. # To add path-specific filer store:
  292. #
  293. # 1. Add a name following the store type separated by a dot ".". E.g., cassandra.tmp
  294. # 2. Add a location configuration. E.g., location = "/tmp/"
  295. # 3. Copy and customize all other configurations.
  296. # Make sure they are not the same if using the same store type!
  297. # 4. Set enabled to true
  298. #
  299. # The following is just using redis as an example
  300. ##########################
  301. [redis2.tmp]
  302. enabled = false
  303. location = "/tmp/"
  304. address = "localhost:6379"
  305. password = ""
  306. database = 1
  307. [tikv]
  308. enabled = false
  309. # If you have many pd address, use ',' split then:
  310. # pdaddrs = "pdhost1:2379, pdhost2:2379, pdhost3:2379"
  311. pdaddrs = "localhost:2379"
  312. # Concurrency for TiKV delete range
  313. deleterange_concurrency = 1
  314. # Enable 1PC
  315. enable_1pc = false
  316. # Set the CA certificate path
  317. ca_path=""
  318. # Set the certificate path
  319. cert_path=""
  320. # Set the private key path
  321. key_path=""
  322. # The name list used to verify the cn name
  323. verify_cn=""