add large disk support

This commit is contained in:
Chris Lu
2019-04-08 22:32:42 -07:00
parent 784c5bb73a
commit 88ba08cb9e
7 changed files with 43 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ func runMaster(cmd *Command, args []string) bool {
if *masterWhiteListOption != "" {
masterWhiteList = strings.Split(*masterWhiteListOption, ",")
}
if *volumeSizeLimitMB > 30*1000 {
if *volumeSizeLimitMB > util.VolumeSizeLimitGB*1000 {
glog.Fatalf("volumeSizeLimitMB should be smaller than 30000")
}

View File

@@ -140,7 +140,7 @@ func runServer(cmd *Command, args []string) bool {
folders := strings.Split(*volumeDataFolders, ",")
if *masterVolumeSizeLimitMB > 30*1000 {
if *masterVolumeSizeLimitMB > util.VolumeSizeLimitGB*1000 {
glog.Fatalf("masterVolumeSizeLimitMB should be less than 30000")
}

View File

@@ -1,5 +1,9 @@
package util
const (
VERSION = "1.28"
import (
"fmt"
)
var (
VERSION = fmt.Sprintf("%s %d.%d", sizeLimit, 1, 28)
)

View File

@@ -0,0 +1,8 @@
// +build !5BytesOffset
package util
const (
sizeLimit = "30GB"
VolumeSizeLimitGB = 30
)

View File

@@ -0,0 +1,8 @@
// +build 5BytesOffset
package util
const (
sizeLimit = "8000GB"
VolumeSizeLimitGB = 8000
)