浏览 175
分享
SeaweedFS can utilize existing familiar data store, e.g., Cassandra, Mysql, Postgres, Redis, to store the filer metadata.
The following takes Cassandra as an example.
Cassandra Setup
Here is the CQL to create the table.CassandraStore.Optionally you can adjust the keyspace name and replication settings.For production, you would want to set replication_factor to 3if there are at least 3 Cassandra servers.
- create keyspace seaweedfs WITH replication = {
- 'class':'SimpleStrategy',
- 'replication_factor':1
- };
- use seaweedfs;
- CREATE TABLE filemeta (
- directory varchar,
- name varchar,
- meta blob,
- PRIMARY KEY (directory, name)
- ) WITH CLUSTERING ORDER BY (name ASC);
Create a filer.toml
Try run weed filer -h
to see an example filer.toml file. The file should be under one of current directory, $HOME/.seaweedfs/, or /etc/seaweedfs/ folers.
Here is the shortest example for Cassandra
- [cassandra]
- enabled = true
- keyspace="seaweedfs"
- hosts=[
- "localhost:9042",
- ]
Starting the Filer
- weed filer
评论列表