SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
default cacheDirWrite to cacheDir
chrislu66ac82bb8f8a
diff --git a/weed/command/mount.go b/weed/command/mount.goindex 22bd29a000..f5972fd300 100644--- a/weed/command/mount.go+++ b/weed/command/mount.go@@ -57,7 +57,7 @@ func init() {mountOptions.concurrentWriters = cmdMount.Flag.Int("concurrentWriters", 32, "limit concurrent goroutine writers")mountOptions.cacheDirForRead = cmdMount.Flag.String("cacheDir", os.TempDir(), "local cache directory for file chunks and meta data")mountOptions.cacheSizeMBForRead = cmdMount.Flag.Int64("cacheCapacityMB", 0, "file chunk read cache capacity in MB")- mountOptions.cacheDirForWrite = cmdMount.Flag.String("cacheDirWrite", os.TempDir(), "buffer writes mostly for large files")+ mountOptions.cacheDirForWrite = cmdMount.Flag.String("cacheDirWrite", "", "buffer writes mostly for large files")mountOptions.dataCenter = cmdMount.Flag.String("dataCenter", "", "prefer to write to the data center")mountOptions.allowOthers = cmdMount.Flag.Bool("allowOthers", true, "allows other users to access the file system")mountOptions.umaskString = cmdMount.Flag.String("umask", "022", "octal umask, e.g., 022, 0111")diff --git a/weed/command/mount_std.go b/weed/command/mount_std.goindex a5325b11e2..f85e7386d0 100644--- a/weed/command/mount_std.go+++ b/weed/command/mount_std.go@@ -216,6 +216,11 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {mountRoot = mountRoot[0 : len(mountRoot)-1]}+ cacheDirForWrite := *option.cacheDirForWrite+ if cacheDirForWrite == "" {+ cacheDirForWrite = *option.cacheDirForRead+ }+seaweedFileSystem := mount.NewSeaweedFileSystem(&mount.Option{MountDirectory: dir,FilerAddresses: filerAddresses,@@ -229,7 +234,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {ConcurrentWriters: *option.concurrentWriters,CacheDirForRead: *option.cacheDirForRead,CacheSizeMBForRead: *option.cacheSizeMBForRead,- CacheDirForWrite: *option.cacheDirForWrite,+ CacheDirForWrite: cacheDirForWrite,DataCenter: *option.dataCenter,Quota: int64(*option.collectionQuota) * 1024 * 1024,MountUid: uid,