diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-02-26 16:46:01 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-02-26 16:46:01 -0800 |
| commit | 0156e2975aa4aabe142301deb72cc2657eb79ee9 (patch) | |
| tree | 191e0a3c65964fa75c3cdc661aefdab16e97e3a2 /weed/command/mount_std.go | |
| parent | 543cf1c80e222f3ff4be5fcfa88d2a7e9c868de2 (diff) | |
| download | seaweedfs-0156e2975aa4aabe142301deb72cc2657eb79ee9.tar.xz seaweedfs-0156e2975aa4aabe142301deb72cc2657eb79ee9.zip | |
mount: add mode to run external to SeaweedFS container cluster
Diffstat (limited to 'weed/command/mount_std.go')
| -rw-r--r-- | weed/command/mount_std.go | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index e26b7c3f5..e8e3fb030 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -46,11 +46,12 @@ func runMount(cmd *Command, args []string) bool { *mountOptions.ttlSec, *mountOptions.dirListCacheLimit, os.FileMode(umask), + *mountOptions.outsideContainerClusterMode, ) } func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCenter string, chunkSizeLimitMB int, - allowOthers bool, ttlSec int, dirListCacheLimit int64, umask os.FileMode) bool { + allowOthers bool, ttlSec int, dirListCacheLimit int64, umask os.FileMode, outsideContainerClusterMode bool) bool { util.LoadConfiguration("security", false) @@ -164,22 +165,23 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente daemonize.SignalOutcome(nil) err = fs.Serve(c, filesys.NewSeaweedFileSystem(&filesys.Option{ - FilerGrpcAddress: filerGrpcAddress, - GrpcDialOption: grpcDialOption, - FilerMountRootPath: mountRoot, - Collection: collection, - Replication: replication, - TtlSec: int32(ttlSec), - ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, - DataCenter: dataCenter, - DirListCacheLimit: dirListCacheLimit, - EntryCacheTtl: 3 * time.Second, - MountUid: uid, - MountGid: gid, - MountMode: mountMode, - MountCtime: fileInfo.ModTime(), - MountMtime: time.Now(), - Umask: umask, + FilerGrpcAddress: filerGrpcAddress, + GrpcDialOption: grpcDialOption, + FilerMountRootPath: mountRoot, + Collection: collection, + Replication: replication, + TtlSec: int32(ttlSec), + ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, + DataCenter: dataCenter, + DirListCacheLimit: dirListCacheLimit, + EntryCacheTtl: 3 * time.Second, + MountUid: uid, + MountGid: gid, + MountMode: mountMode, + MountCtime: fileInfo.ModTime(), + MountMtime: time.Now(), + Umask: umask, + OutsideContainerClusterMode: outsideContainerClusterMode, })) if err != nil { fuse.Unmount(dir) |
