diff options
| author | lfhy <821923589@qq.com> | 2023-02-26 01:48:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-25 09:48:59 -0800 |
| commit | 1976ca9160aa9b06c258d4afc3a03367584165e0 (patch) | |
| tree | 7bca86459a200b6df11405fe1bb2178c1fd1ec35 /weed/command/server.go | |
| parent | 214b7cd286b9f4f15b5ca13d7827aa553a72c587 (diff) | |
| download | seaweedfs-1976ca9160aa9b06c258d4afc3a03367584165e0.tar.xz seaweedfs-1976ca9160aa9b06c258d4afc3a03367584165e0.zip | |
add -disk to filer command (#4247)
* add -disk to filer command
* add diskType to filer.grpc
* use filer.disk when filerWebDavOptions.disk is empty
* add filer.disk to weed server command.
---------
Co-authored-by: 三千院羽 <3000y@MacBook-Pro.lan>
Diffstat (limited to 'weed/command/server.go')
| -rw-r--r-- | weed/command/server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/command/server.go b/weed/command/server.go index f66f95182..ba56d8897 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -115,6 +115,7 @@ func init() { filerOptions.localSocket = cmdServer.Flag.String("filer.localSocket", "", "default to /tmp/seaweedfs-filer-<port>.sock") filerOptions.showUIDirectoryDelete = cmdServer.Flag.Bool("filer.ui.deleteDir", true, "enable filer UI show delete directory button") filerOptions.downloadMaxMBps = cmdServer.Flag.Int("filer.downloadMaxMBps", 0, "download max speed for each download request, in MB per second") + filerOptions.diskType = cmdServer.Flag.String("filer.disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag") serverOptions.v.port = cmdServer.Flag.Int("volume.port", 8080, "volume server http listen port") serverOptions.v.portGrpc = cmdServer.Flag.Int("volume.port.grpc", 0, "volume server grpc listen port") @@ -253,6 +254,9 @@ func runServer(cmd *Command, args []string) bool { serverWhiteList := util.StringSplit(*serverWhiteListOption, ",") if *isStartingFiler { + if *filerOptions.diskType == "" && *serverOptions.v.diskType != "" { + filerOptions.diskType = serverOptions.v.diskType + } go func() { time.Sleep(1 * time.Second) filerOptions.startFiler() |
