diff options
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/mount.go | 2 | ||||
| -rw-r--r-- | weed/command/mount_std.go | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/mount.go b/weed/command/mount.go index 545ba8a43..428e073f2 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -11,6 +11,7 @@ type MountOptions struct { dir *string dirAutoCreate *bool collection *string + collectionQuota *int replication *string diskType *string ttlSec *int @@ -44,6 +45,7 @@ func init() { mountOptions.dir = cmdMount.Flag.String("dir", ".", "mount weed filer to this directory") mountOptions.dirAutoCreate = cmdMount.Flag.Bool("dirAutoCreate", false, "auto create the directory to mount to") mountOptions.collection = cmdMount.Flag.String("collection", "", "collection to create the files") + mountOptions.collectionQuota = cmdMount.Flag.Int("collectionQuotaMB", 0, "quota for the collection") mountOptions.replication = cmdMount.Flag.String("replication", "", "replication(e.g. 000, 001) to create to files. If empty, let filer decide.") mountOptions.diskType = cmdMount.Flag.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag") mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds") diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index dd07636fe..d865e053f 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -209,6 +209,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { CacheDir: *option.cacheDir, CacheSizeMB: *option.cacheSizeMB, DataCenter: *option.dataCenter, + Quota: int64(*option.collectionQuota) * 1024 * 1024, MountUid: uid, MountGid: gid, MountMode: mountMode, |
