|
@ -46,11 +46,12 @@ func runMount(cmd *Command, args []string) bool { |
|
|
*mountOptions.ttlSec, |
|
|
*mountOptions.ttlSec, |
|
|
*mountOptions.dirListCacheLimit, |
|
|
*mountOptions.dirListCacheLimit, |
|
|
os.FileMode(umask), |
|
|
os.FileMode(umask), |
|
|
|
|
|
*mountOptions.outsideContainerClusterMode, |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCenter string, chunkSizeLimitMB int, |
|
|
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) |
|
|
util.LoadConfiguration("security", false) |
|
|
|
|
|
|
|
@ -164,22 +165,23 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente |
|
|
daemonize.SignalOutcome(nil) |
|
|
daemonize.SignalOutcome(nil) |
|
|
|
|
|
|
|
|
err = fs.Serve(c, filesys.NewSeaweedFileSystem(&filesys.Option{ |
|
|
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 { |
|
|
if err != nil { |
|
|
fuse.Unmount(dir) |
|
|
fuse.Unmount(dir) |
|
|