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/filer.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/filer.go')
| -rw-r--r-- | weed/command/filer.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go index 5a5a458d4..5bdf53455 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -60,6 +60,7 @@ type FilerOptions struct { localSocket *string showUIDirectoryDelete *bool downloadMaxMBps *int + diskType *string } func init() { @@ -89,6 +90,7 @@ func init() { f.localSocket = cmdFiler.Flag.String("localSocket", "", "default to /tmp/seaweedfs-filer-<port>.sock") f.showUIDirectoryDelete = cmdFiler.Flag.Bool("ui.deleteDir", true, "enable filer UI show delete directory button") f.downloadMaxMBps = cmdFiler.Flag.Int("downloadMaxMBps", 0, "download max speed for each download request, in MB per second") + f.diskType = cmdFiler.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag") // start s3 on filer filerStartS3 = cmdFiler.Flag.Bool("s3", false, "whether to start S3 gateway") @@ -183,6 +185,11 @@ func runFiler(cmd *Command, args []string) bool { if *filerStartWebDav { filerWebDavOptions.filer = &filerAddress + + if *filerWebDavOptions.disk == "" { + filerWebDavOptions.disk = f.diskType + } + go func(delay time.Duration) { time.Sleep(delay * time.Second) filerWebDavOptions.startWebDav() @@ -243,6 +250,7 @@ func (fo *FilerOptions) startFiler() { ConcurrentUploadLimit: int64(*fo.concurrentUploadLimitMB) * 1024 * 1024, ShowUIDirectoryDelete: *fo.showUIDirectoryDelete, DownloadMaxBytesPs: int64(*fo.downloadMaxMBps) * 1024 * 1024, + DiskType: *fo.diskType, }) if nfs_err != nil { glog.Fatalf("Filer startup error: %v", nfs_err) |
