mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 12:49:41 +08:00
filer: default to leveldb2
This commit is contained in:
parent
ee933cd859
commit
15ecf4e3bf
@ -33,7 +33,7 @@ EXPOSE 9333
|
||||
# s3 server http port
|
||||
EXPOSE 8333
|
||||
|
||||
RUN mkdir -p /data/filerdb
|
||||
RUN mkdir -p /data/filerldb2
|
||||
|
||||
VOLUME /data
|
||||
|
||||
|
@ -16,7 +16,7 @@ EXPOSE 9333
|
||||
# s3 server http port
|
||||
EXPOSE 8333
|
||||
|
||||
RUN mkdir -p /data/filerdb
|
||||
RUN mkdir -p /data/filerldb2
|
||||
|
||||
VOLUME /data
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
[leveldb]
|
||||
[leveldb2]
|
||||
enabled = true
|
||||
dir = "/data/filerdb"
|
||||
dir = "/data/filerldb2"
|
||||
|
@ -94,9 +94,9 @@ func (fo *FilerOptions) startFiler() {
|
||||
publicVolumeMux = http.NewServeMux()
|
||||
}
|
||||
|
||||
defaultLevelDbDirectory := "./filerdb"
|
||||
defaultLevelDbDirectory := "./filerldb2"
|
||||
if fo.defaultLevelDbDirectory != nil {
|
||||
defaultLevelDbDirectory = *fo.defaultLevelDbDirectory + "/filerdb"
|
||||
defaultLevelDbDirectory = *fo.defaultLevelDbDirectory + "/filerldb2"
|
||||
}
|
||||
|
||||
fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb2"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/memdb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/mysql"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/postgres"
|
||||
@ -69,8 +70,8 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
|
||||
v := viper.GetViper()
|
||||
if !util.LoadConfiguration("filer", false) {
|
||||
v.Set("leveldb.enabled", true)
|
||||
v.Set("leveldb.dir", option.DefaultLevelDbDir)
|
||||
v.Set("leveldb2.enabled", true)
|
||||
v.Set("leveldb2.dir", option.DefaultLevelDbDir)
|
||||
_, err := os.Stat(option.DefaultLevelDbDir)
|
||||
if os.IsNotExist(err) {
|
||||
os.MkdirAll(option.DefaultLevelDbDir, 0755)
|
||||
|
Loading…
Reference in New Issue
Block a user