Remove volumePreallocate option from docker containers (#8451)
Some filesystems, such as XFS, may over-allocate disk spaces when using volume preallocation. Remove this option from the default docker entrypoint scripts to allow volumes to use only the necessary disk space. Fixes: https://github.com/seaweedfs/seaweedfs/issues/6465#issuecomment-3964174718 Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -58,7 +58,7 @@ isArgPassed() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
||||||
'master')
|
'master')
|
||||||
ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024"
|
ARGS="-mdir=/data -volumeSizeLimitMB=1024"
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed -logtostderr=true master $ARGS $@
|
exec /usr/bin/weed -logtostderr=true master $ARGS $@
|
||||||
;;
|
;;
|
||||||
@@ -73,9 +73,9 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
'server')
|
'server')
|
||||||
ARGS="-dir=/data -volume.max=0 -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
ARGS="-dir=/data -volume.max=0 -master.volumeSizeLimitMB=1024"
|
||||||
if isArgPassed "-volume.max" "$@"; then
|
if isArgPassed "-volume.max" "$@"; then
|
||||||
ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
ARGS="-dir=/data -master.volumeSizeLimitMB=1024"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed -logtostderr=true server $ARGS $@
|
exec /usr/bin/weed -logtostderr=true server $ARGS $@
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ isArgPassed() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
||||||
'master')
|
'master')
|
||||||
ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024"
|
ARGS="-mdir=/data -volumeSizeLimitMB=1024"
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed -logtostderr=true master $ARGS "$@"
|
exec /usr/bin/weed -logtostderr=true master $ARGS "$@"
|
||||||
;;
|
;;
|
||||||
@@ -48,9 +48,9 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
'server')
|
'server')
|
||||||
ARGS="-dir=/data -volume.max=0 -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
ARGS="-dir=/data -volume.max=0 -master.volumeSizeLimitMB=1024"
|
||||||
if isArgPassed "-volume.max" "$@"; then
|
if isArgPassed "-volume.max" "$@"; then
|
||||||
ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024"
|
ARGS="-dir=/data -master.volumeSizeLimitMB=1024"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
exec /usr/bin/weed -logtostderr=true server $ARGS "$@"
|
exec /usr/bin/weed -logtostderr=true server $ARGS "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user