diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-13 13:50:14 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-13 13:50:14 -0800 |
| commit | 4bd8a692d80801f3864cf9ce4325908529a0f6ef (patch) | |
| tree | 14ecca5d79494628a41e8cf304aa395bb47948fe /weed/command | |
| parent | 712b3e9e53e116f58399fe30cd7038b234a5832b (diff) | |
| download | seaweedfs-4bd8a692d80801f3864cf9ce4325908529a0f6ef.tar.xz seaweedfs-4bd8a692d80801f3864cf9ce4325908529a0f6ef.zip | |
disk type can be generic tags
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/mount_std.go | 6 | ||||
| -rw-r--r-- | weed/command/volume.go | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index e2aa7e7d4..56338e327 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -169,11 +169,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { mountRoot = mountRoot[0 : len(mountRoot)-1] } - diskType, err := storage.ToDiskType(*option.diskType) - if err != nil { - fmt.Printf("failed to parse volume type: %v\n", err) - return false - } + diskType := storage.ToDiskType(*option.diskType) seaweedFileSystem := filesys.NewSeaweedFileSystem(&filesys.Option{ MountDirectory: dir, diff --git a/weed/command/volume.go b/weed/command/volume.go index fa7dcaa06..9fadcf7df 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -173,11 +173,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v var diskTypes []storage.DiskType diskTypeStrings := strings.Split(*v.diskType, ",") for _, diskTypeString := range diskTypeStrings { - if diskType, err := storage.ToDiskType(diskTypeString); err == nil { - diskTypes = append(diskTypes, diskType) - } else { - glog.Fatalf("failed to parse volume type: %v", err) - } + diskTypes = append(diskTypes, storage.ToDiskType(diskTypeString)) } if len(diskTypes) == 1 && len(v.folders) > 1 { for i := 0; i < len(v.folders)-1; i++ { |
