diff --git a/.env.sample b/.env.sample index 252b569..edb3431 100644 --- a/.env.sample +++ b/.env.sample @@ -7,10 +7,22 @@ COMPOSE_FILE="compose.yml" SECRET_RPC_SECRET_VERSION=v1 +REPLICATION_FACTOR=2 # changing the replication factor is not supported and requires deleting the existing cluster layout metadata. + ############################### ##### Map local directory ##### ############################### + # If either meta or local is left blank (an empty string does not count it has to have no value) then it will default to the original docker volume #COMPOSE_FILE="$COMPOSE_FILE:compose.localfs.yml" #LOCAL_FOLDER_META -#LOCAL_FOLDER_DATA \ No newline at end of file +#LOCAL_FOLDER_DATA + +############################### + +CONSISTENCY_MODE=consistent +METADATA_FSYNC=false +DATA_FSYNC=false +DISABLE_SCRUB=false +BLOCK_SIZE=1MiB # only increase if there is a fast network connection between nodes + diff --git a/abra.sh b/abra.sh index 2448995..7eca4b1 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1 @@ -export GARAGE_CONF_VERSION=v2 \ No newline at end of file +export GARAGE_CONF_VERSION=v3 \ No newline at end of file diff --git a/garage.toml.tmpl b/garage.toml.tmpl index 2661396..8cdf8c4 100644 --- a/garage.toml.tmpl +++ b/garage.toml.tmpl @@ -3,7 +3,12 @@ data_dir = "/var/lib/garage/data" db_engine = "lmdb" metadata_auto_snapshot_interval = "6h" -replication_factor = 3 +replication_factor = {{ env "REPLICATION_FACTOR" }} +consistency_mode = {{ env "CONSISTENCY_MODE" }} +metadata_fsync = {{ env "METADATA_FSYNC" }} +data_fsync = {{ env "DATA_FSYNC" }} +disable_scrub = {{ env "DISABLE_SCRUB" }} +block_size = {{ env "BLOCK_SIZE" }} compression_level = 2