aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 00:58:58 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 00:58:58 -0800
commite9cd798bd372741753efcba2af594b00fe7b8437 (patch)
treee291019e7394a874a292ee90c832a65745f57fd4 /weed/command/mount_std.go
parent16cd6fb27838db95054701f5567c93d51bf24d5f (diff)
downloadseaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.tar.xz
seaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.zip
adding volume type
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 83cb352ff..94a145c1b 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -5,6 +5,7 @@ package command
import (
"context"
"fmt"
+ "github.com/chrislusf/seaweedfs/weed/storage"
"os"
"os/user"
"path"
@@ -167,6 +168,12 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
mountRoot = mountRoot[0 : len(mountRoot)-1]
}
+ volumeType, err := storage.ToVolumeType(*option.volumeType)
+ if err != nil {
+ fmt.Printf("failed to parse volume type: %v\n", err)
+ return false
+ }
+
seaweedFileSystem := filesys.NewSeaweedFileSystem(&filesys.Option{
FilerGrpcAddress: filerGrpcAddress,
GrpcDialOption: grpcDialOption,
@@ -174,6 +181,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
Collection: *option.collection,
Replication: *option.replication,
TtlSec: int32(*option.ttlSec),
+ VolumeType: volumeType,
ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024,
ConcurrentWriters: *option.concurrentWriters,
CacheDir: *option.cacheDir,