Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

master: put metadata under instance specific folder

chrislu492da3dbce53
diff --git a/weed/command/master.go b/weed/command/master.go
index 9587df0557..ab8466d47e 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -1,9 +1,11 @@
package command
import (
+ "fmt"
"golang.org/x/exp/slices"
"net/http"
"os"
+ "path"
"strings"
"time"
@@ -151,11 +153,12 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) {
}
// start raftServer
+ metaDir := path.Join(*masterOption.metaFolder, fmt.Sprintf("m%d", *masterOption.port))
raftServerOption := &weed_server.RaftServerOption{
GrpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.master"),
Peers: masterPeers,
ServerAddr: myMasterAddress,
- DataDir: util.ResolvePath(*masterOption.metaFolder),
+ DataDir: util.ResolvePath(metaDir),
Topo: ms.Topo,
RaftResumeState: *masterOption.raftResumeState,
HeartbeatInterval: *masterOption.heartbeatInterval,