aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_copy.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/filer_copy.go
parent16cd6fb27838db95054701f5567c93d51bf24d5f (diff)
downloadseaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.tar.xz
seaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.zip
adding volume type
Diffstat (limited to 'weed/command/filer_copy.go')
-rw-r--r--weed/command/filer_copy.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index 322e5418d..1102a8cff 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -37,6 +37,7 @@ type CopyOptions struct {
replication *string
collection *string
ttl *string
+ volumeType *string
maxMB *int
masterClient *wdclient.MasterClient
concurrenctFiles *int
@@ -54,6 +55,7 @@ func init() {
copy.replication = cmdCopy.Flag.String("replication", "", "replication type")
copy.collection = cmdCopy.Flag.String("collection", "", "optional collection name")
copy.ttl = cmdCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y")
+ copy.volumeType = cmdCopy.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive")
copy.maxMB = cmdCopy.Flag.Int("maxMB", 32, "split files larger than the limit")
copy.concurrenctFiles = cmdCopy.Flag.Int("c", 8, "concurrent file copy goroutines")
copy.concurrenctChunks = cmdCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file")
@@ -311,6 +313,7 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err
Replication: *worker.options.replication,
Collection: *worker.options.collection,
TtlSec: worker.options.ttlSec,
+ VolumeType: *worker.options.volumeType,
Path: task.destinationUrlPath,
}
@@ -405,6 +408,7 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
Replication: *worker.options.replication,
Collection: *worker.options.collection,
TtlSec: worker.options.ttlSec,
+ VolumeType: *worker.options.volumeType,
Path: task.destinationUrlPath + fileName,
}