From e0dfa7a069ee4a5d9951d7d073a3404690fbf716 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 16 Jul 2017 21:40:47 -0700 Subject: [PATCH] ensure 30GB or less avoid https://github.com/chrislusf/seaweedfs/issues/535 --- weed/command/master.go | 3 +++ weed/command/server.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/weed/command/master.go b/weed/command/master.go index 8c5efbb9f..16e343f77 100644 --- a/weed/command/master.go +++ b/weed/command/master.go @@ -65,6 +65,9 @@ func runMaster(cmd *Command, args []string) bool { if *masterWhiteListOption != "" { masterWhiteList = strings.Split(*masterWhiteListOption, ",") } + if *volumeSizeLimitMB > 30*1000 { + glog.Fatalf("volumeSizeLimitMB should be smaller than 30000") + } r := mux.NewRouter() ms := weed_server.NewMasterServer(r, *mport, *metaFolder, diff --git a/weed/command/server.go b/weed/command/server.go index cd8ddf66a..2267d4382 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -151,6 +151,10 @@ func runServer(cmd *Command, args []string) bool { } } + if *masterVolumeSizeLimitMB > 30*1000 { + glog.Fatalf("masterVolumeSizeLimitMB should be less than 30000") + } + if *masterMetaFolder == "" { *masterMetaFolder = folders[0] }