From 9b6bbf7d45ba34631e44a81c9f311e6177c35c10 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 25 Feb 2026 22:11:15 -0800 Subject: [PATCH] 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 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docker/entrypoint.sh | 6 +++--- docker/entrypoint_e2e.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d5ef16be1..7d8bd24f2 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -58,7 +58,7 @@ isArgPassed() { case "$1" in 'master') - ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024" + ARGS="-mdir=/data -volumeSizeLimitMB=1024" shift exec /usr/bin/weed -logtostderr=true master $ARGS $@ ;; @@ -73,9 +73,9 @@ case "$1" in ;; '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 - ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024" + ARGS="-dir=/data -master.volumeSizeLimitMB=1024" fi shift exec /usr/bin/weed -logtostderr=true server $ARGS $@ diff --git a/docker/entrypoint_e2e.sh b/docker/entrypoint_e2e.sh index 9716bf37e..291cc043b 100755 --- a/docker/entrypoint_e2e.sh +++ b/docker/entrypoint_e2e.sh @@ -33,7 +33,7 @@ isArgPassed() { case "$1" in 'master') - ARGS="-mdir=/data -volumePreallocate -volumeSizeLimitMB=1024" + ARGS="-mdir=/data -volumeSizeLimitMB=1024" shift exec /usr/bin/weed -logtostderr=true master $ARGS "$@" ;; @@ -48,9 +48,9 @@ case "$1" in ;; '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 - ARGS="-dir=/data -master.volumePreallocate -master.volumeSizeLimitMB=1024" + ARGS="-dir=/data -master.volumeSizeLimitMB=1024" fi shift exec /usr/bin/weed -logtostderr=true server $ARGS "$@"