Merge branch 'chrislusf:master' into acl-pr
This commit is contained in:
@@ -24,7 +24,7 @@ case "$1" in
|
|||||||
'master')
|
'master')
|
||||||
ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024"
|
ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024"
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed master $ARGS $@
|
exec /usr/bin/weed -logtostderr=true master $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'volume')
|
'volume')
|
||||||
@@ -33,7 +33,7 @@ case "$1" in
|
|||||||
ARGS="-dir=/data"
|
ARGS="-dir=/data"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed volume $ARGS $@
|
exec /usr/bin/weed -logtostderr=true volume $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'server')
|
'server')
|
||||||
@@ -42,19 +42,19 @@ case "$1" in
|
|||||||
ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed server $ARGS $@
|
exec /usr/bin/weed -logtostderr=true server $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'filer')
|
'filer')
|
||||||
ARGS=""
|
ARGS=""
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed filer $ARGS $@
|
exec /usr/bin/weed -logtostderr=true filer $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
's3')
|
's3')
|
||||||
ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE"
|
ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE"
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed s3 $ARGS $@
|
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -155,13 +155,36 @@ func RunMount2(option *Mount2Options, umask os.FileMode) bool {
|
|||||||
Name: "seaweedfs",
|
Name: "seaweedfs",
|
||||||
SingleThreaded: false,
|
SingleThreaded: false,
|
||||||
DisableXAttrs: false,
|
DisableXAttrs: false,
|
||||||
Debug: false, // *option.debug,
|
Debug: *option.debug,
|
||||||
EnableLocks: false,
|
EnableLocks: false,
|
||||||
ExplicitDataCacheControl: false,
|
ExplicitDataCacheControl: false,
|
||||||
// SyncRead: false, // set to false to enable the FUSE_CAP_ASYNC_READ capability
|
DirectMount: true,
|
||||||
DirectMount: true,
|
DirectMountFlags: 0,
|
||||||
DirectMountFlags: 0,
|
//SyncRead: false, // set to false to enable the FUSE_CAP_ASYNC_READ capability
|
||||||
// EnableAcl: false,
|
//EnableAcl: true,
|
||||||
|
}
|
||||||
|
if *option.nonempty {
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "nonempty")
|
||||||
|
}
|
||||||
|
if *option.readOnly {
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "rdonly")
|
||||||
|
} else {
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "ro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
// https://github-wiki-see.page/m/macfuse/macfuse/wiki/Mount-Options
|
||||||
|
ioSizeMB := 1
|
||||||
|
for ioSizeMB*2 <= *option.chunkSizeLimitMB && ioSizeMB*2 <= 32 {
|
||||||
|
ioSizeMB *= 2
|
||||||
|
}
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "daemon_timeout=600")
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "noapplexattr")
|
||||||
|
// fuseMountOptions.Options = append(fuseMountOptions.Options, "novncache") // need to test effectiveness
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "slow_statfs")
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, "volname="+*option.filer)
|
||||||
|
fuseMountOptions.Options = append(fuseMountOptions.Options, fmt.Sprintf("iosize=%d", ioSizeMB*1024*1024))
|
||||||
}
|
}
|
||||||
|
|
||||||
// find mount point
|
// find mount point
|
||||||
|
|||||||
Reference in New Issue
Block a user