mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add large disk support
This commit is contained in:
parent
784c5bb73a
commit
88ba08cb9e
|
@ -29,9 +29,12 @@ deploy:
|
||||||
- build/linux_arm64.tar.gz
|
- build/linux_arm64.tar.gz
|
||||||
- build/linux_386.tar.gz
|
- build/linux_386.tar.gz
|
||||||
- build/linux_amd64.tar.gz
|
- build/linux_amd64.tar.gz
|
||||||
|
- build/linux_amd64_large_disk.tar.gz
|
||||||
- build/darwin_amd64.tar.gz
|
- build/darwin_amd64.tar.gz
|
||||||
|
- build/darwin_amd64_large_disk.tar.gz
|
||||||
- build/windows_386.zip
|
- build/windows_386.zip
|
||||||
- build/windows_amd64.zip
|
- build/windows_amd64.zip
|
||||||
|
- build/windows_amd64_large_disk.zip
|
||||||
- build/freebsd_arm.tar.gz
|
- build/freebsd_arm.tar.gz
|
||||||
- build/freebsd_amd64.tar.gz
|
- build/freebsd_amd64.tar.gz
|
||||||
- build/freebsd_386.tar.gz
|
- build/freebsd_386.tar.gz
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -12,6 +12,9 @@ build = CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -ldflags "-extldflags -stat
|
||||||
tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3)
|
tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3)
|
||||||
zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3)
|
zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3)
|
||||||
|
|
||||||
|
build_large = CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -tags 5BytesOffset -ldflags "-extldflags -static" -o build/$(appname)$(3) $(SOURCE_DIR)
|
||||||
|
tar_large = cd build && tar -cvzf $(1)_$(2)_large_disk.tar.gz $(appname)$(3) && rm $(appname)$(3)
|
||||||
|
zip_large = cd build && zip $(1)_$(2)_large_disk.zip $(appname)$(3) && rm $(appname)$(3)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
@ -32,9 +35,21 @@ linux: deps
|
||||||
mkdir -p linux
|
mkdir -p linux
|
||||||
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR)
|
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR)
|
||||||
|
|
||||||
release: deps windows_build darwin_build linux_build bsd_build
|
release: deps windows_build darwin_build linux_build bsd_build 5_byte_linux_build 5_byte_darwin_build 5_byte_windows_build
|
||||||
|
|
||||||
##### LINUX BUILDS #####
|
##### LINUX BUILDS #####
|
||||||
|
5_byte_linux_build:
|
||||||
|
$(call build_large,linux,amd64,)
|
||||||
|
$(call tar_large,linux,amd64)
|
||||||
|
|
||||||
|
5_byte_darwin_build:
|
||||||
|
$(call build_large,darwin,amd64,)
|
||||||
|
$(call tar_large,darwin,amd64)
|
||||||
|
|
||||||
|
5_byte_windows_build:
|
||||||
|
$(call build_large,windows,amd64,.exe)
|
||||||
|
$(call zip_large,windows,amd64,.exe)
|
||||||
|
|
||||||
linux_build: build/linux_arm.tar.gz build/linux_arm64.tar.gz build/linux_386.tar.gz build/linux_amd64.tar.gz
|
linux_build: build/linux_arm.tar.gz build/linux_arm64.tar.gz build/linux_386.tar.gz build/linux_amd64.tar.gz
|
||||||
|
|
||||||
build/linux_386.tar.gz: $(sources)
|
build/linux_386.tar.gz: $(sources)
|
||||||
|
|
|
@ -70,7 +70,7 @@ func runMaster(cmd *Command, args []string) bool {
|
||||||
if *masterWhiteListOption != "" {
|
if *masterWhiteListOption != "" {
|
||||||
masterWhiteList = strings.Split(*masterWhiteListOption, ",")
|
masterWhiteList = strings.Split(*masterWhiteListOption, ",")
|
||||||
}
|
}
|
||||||
if *volumeSizeLimitMB > 30*1000 {
|
if *volumeSizeLimitMB > util.VolumeSizeLimitGB*1000 {
|
||||||
glog.Fatalf("volumeSizeLimitMB should be smaller than 30000")
|
glog.Fatalf("volumeSizeLimitMB should be smaller than 30000")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ func runServer(cmd *Command, args []string) bool {
|
||||||
|
|
||||||
folders := strings.Split(*volumeDataFolders, ",")
|
folders := strings.Split(*volumeDataFolders, ",")
|
||||||
|
|
||||||
if *masterVolumeSizeLimitMB > 30*1000 {
|
if *masterVolumeSizeLimitMB > util.VolumeSizeLimitGB*1000 {
|
||||||
glog.Fatalf("masterVolumeSizeLimitMB should be less than 30000")
|
glog.Fatalf("masterVolumeSizeLimitMB should be less than 30000")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package util
|
package util
|
||||||
|
|
||||||
const (
|
import (
|
||||||
VERSION = "1.28"
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
VERSION = fmt.Sprintf("%s %d.%d", sizeLimit, 1, 28)
|
||||||
)
|
)
|
||||||
|
|
8
weed/util/constants_4bytes.go
Normal file
8
weed/util/constants_4bytes.go
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
// +build !5BytesOffset
|
||||||
|
|
||||||
|
package util
|
||||||
|
|
||||||
|
const (
|
||||||
|
sizeLimit = "30GB"
|
||||||
|
VolumeSizeLimitGB = 30
|
||||||
|
)
|
8
weed/util/constants_5bytes.go
Normal file
8
weed/util/constants_5bytes.go
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
// +build 5BytesOffset
|
||||||
|
|
||||||
|
package util
|
||||||
|
|
||||||
|
const (
|
||||||
|
sizeLimit = "8000GB"
|
||||||
|
VolumeSizeLimitGB = 8000
|
||||||
|
)
|
Loading…
Reference in a new issue