Files
seaweedfs/seaweed-block/deploy/config/blockvolume.env
T
pingqiuandClaude Opus 5.5 663ab3b2c3 docs: README v2 with standalone deployment, Kubernetes status and workspace measurements
The README is rewritten to about 230 lines. Detail that used to live in the
README moves to linked documents:

- docs/standalone-deployment.md: running blockmaster and blockvolume
  without Kubernetes, with a read-only first-volume check and a separate
  write test for scratch hosts.
- docs/kubernetes-status.md: the Kubernetes alpha feature status and
  non-claims.
- docs/workspace-measurements.md: the agent workspace measurements.
- deploy/config and deploy/systemd: env files, a topology example and
  systemd units for blockmaster and blockvolume (plus a ublk variant).

docs/quickstart-kubernetes.md and docs/design/block-design.md are updated
to match current main (auto durable-impl default, fuzz targets, the
concurrent filer CAS test, the CI workflow, the TLA+ specs in docs/spec),
and docs/assets/seaweed-block-hero.svg is refreshed.

Docs and example configuration only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:01:51 -08:00

138 lines
6.5 KiB
Bash

# Seaweed Block: example settings for one blockvolume
# (deploy/systemd/sw-blockvolume.service, and the root ublk variant
# sw-blockvolume-ublk.service, which reads this file first and then
# blockvolume-ublk.env). Install as /etc/sw-block/blockvolume.env, readable
# only by root and the sw-block user (it can hold the iSCSI CHAP secret).
#
# The binaries are configured by command-line flags. The SWB_* variables in
# this file exist only so the example units can build those flags;
# blockvolume does not read them. The one exception is the iSCSI CHAP pair at
# the end, which blockvolume reads from the environment. Each entry names the
# flag it feeds, the flag's default, and what it means.
#
# State: the unit's StateDirectory=sw-block-volume creates
# /var/lib/sw-block-volume, owned by the sw-block user. It is separate from
# blockmaster's /var/lib/sw-block-master.
# ---------------------------------------------------------------- blockvolume
# --master (required). blockmaster gRPC address.
SWB_MASTER_ADDR=127.0.0.1:9180
# --server-id, --volume-id, --replica-id (required). Must match a slot in the
# topology.
SWB_SERVER_ID=s1
SWB_VOLUME_ID=v1
SWB_REPLICA_ID=r1
# --data-addr, --ctrl-addr (required). Data-path and control-path addresses.
SWB_DATA_ADDR=127.0.0.1:9201
SWB_CTRL_ADDR=127.0.0.1:9202
# --status-addr (default empty: disabled). Status HTTP endpoint, loopback only
# unless --allow-external-status-bind; unauthenticated.
SWB_STATUS_ADDR=127.0.0.1:9203
# --heartbeat-interval (default 2s). Heartbeat send interval.
SWB_HEARTBEAT_INTERVAL=2s
# --recover-timeout (default 30s). How long a primary-assigned replica may stay
# not promotion-ready before it reports itself unhealthy (recovery_timeout).
SWB_RECOVER_TIMEOUT=30s
# --durable-root (default empty: in-memory, NOT durable). Directory for the
# volume's storage files. Must be writable by the service user.
SWB_DURABLE_ROOT=/var/lib/sw-block-volume/volumes
# --durable-impl (default empty: auto). Auto creates a new volume as walstore,
# opens an existing one with its on-disk format, and refuses a walstore-chunk
# root. Explicit values: walstore; walstore-chunk (walstore published to
# SeaweedFS, proof of concept); smartwal (experimental). This example pins
# walstore.
SWB_DURABLE_IMPL=walstore
# --durable-blocks (default 2048), --durable-blocksize (default 4096). Volume
# geometry on first create; ignored when an existing volume is opened.
# 65536 x 4096 = 256 MiB.
SWB_DURABLE_BLOCKS=65536
SWB_DURABLE_BLOCKSIZE=4096
# --nvme-listen (default empty: disabled). NVMe/TCP target address. Loopback
# only (no authentication) unless --allow-external-nvme-bind.
SWB_NVME_LISTEN=127.0.0.1:4420
# --nvme-subsysnqn (required with --nvme-listen). NVMe subsystem NQN.
SWB_NVME_SUBSYSNQN=nqn.2026-05.io.seaweedfs:v1
# --nvme-ns (default 1). NVMe namespace id.
SWB_NVME_NS=1
# --nvme-max-h2c-data-length (default 0: target default). MaxH2CDataLength.
SWB_NVME_MAX_H2C_DATA_LENGTH=0
# --ublk-device (default -1: disabled). Serve the volume as /dev/ublkbN through
# the Linux ublk_drv module. Needs root (see the unit file).
SWB_UBLK_DEVICE=-1
# --ublk-queues (default 0: 1 queue), --ublk-queue-depth (default 0: 64).
SWB_UBLK_QUEUES=0
SWB_UBLK_QUEUE_DEPTH=0
# --iscsi-listen (default empty: disabled). iSCSI target address; loopback only
# unless --allow-external-iscsi-bind, which requires CHAP.
SWB_ISCSI_LISTEN=
# --iscsi-iqn (required with --iscsi-listen). Target IQN.
SWB_ISCSI_IQN=
# --iscsi-portal-addr (default empty: the bound address). Advertised
# TargetAddress in SendTargets responses.
SWB_ISCSI_PORTAL_ADDR=
# --iscsi-lun (default 0). LUN id.
SWB_ISCSI_LUN=0
# --iscsi-dataout-timeout (default 0: target default). R2T/Data-Out wait bound.
SWB_ISCSI_DATAOUT_TIMEOUT=0
# --replication-ack (default best-effort). best-effort, sync-quorum or
# sync-all. sync-* modes fail foreground writes when the required replica
# acknowledgement is unavailable. Only matters with more than one slot.
SWB_REPLICATION_ACK=best-effort
# --wal-retention-lsns (default 0: strict checkpoint-driven recycle). walstore
# only: WAL kept past the checkpoint so a lagging replica can catch up.
SWB_WAL_RETENTION_LSNS=0
# --recovery-mode (default legacy). legacy or dual-lane rebuild path.
SWB_RECOVERY_MODE=legacy
# --degraded-probe-interval (default 0: off). Degraded-peer probe interval.
SWB_DEGRADED_PROBE_INTERVAL=0
# --degraded-probe-cooldown-base (default 5s), --degraded-probe-cooldown-cap
# (default 60s). Per-peer backoff after a probe attempt.
SWB_DEGRADED_PROBE_COOLDOWN_BASE=5s
SWB_DEGRADED_PROBE_COOLDOWN_CAP=60s
# Agent workspace disks (proof of concept). These flags are accepted only with
# SWB_DURABLE_IMPL=walstore-chunk; leave them at their defaults otherwise.
# --chunk-filer (default empty; required with walstore-chunk). SeaweedFS filer
# gRPC address host:port.
SWB_CHUNK_FILER=
# --chunk-path (default /swblock/chunks). Filer directory, one directory per
# volume (HEAD and chunk key bindings).
SWB_CHUNK_PATH=/swblock/chunks
# --chunk-collection, --chunk-replication (default empty: filer default or
# storage rule). Collection and replication for chunk needles.
SWB_CHUNK_COLLECTION=
SWB_CHUNK_REPLICATION=
# --chunk-capture-interval (default 0: no timer). Automatic cut once this long
# has passed since the last successful cut, e.g. 15m as a host-loss safety net.
SWB_CHUNK_CAPTURE_INTERVAL=0
# --chunk-upload-concurrency (default 8; 1..64). Parallel dirty-chunk uploads.
SWB_CHUNK_UPLOAD_CONCURRENCY=8
# --chunk-dirty-threshold (default 512 chunks = 2 GiB; 0 = unbounded). Bound
# on one cut's barrier copy; never triggers a cut.
SWB_CHUNK_DIRTY_THRESHOLD=512
# --chunk-control-endpoint (default false). Expose /chunk/* (cut, snapshot,
# snapshots, snapshot/delete, detach) on the status listener; needs
# SWB_STATUS_ADDR.
SWB_CHUNK_CONTROL_ENDPOINT=false
# --workspace-lease (default false). Require a host-owned master lease; fail
# closed when it is unavailable. Needs walstore-chunk and --workspace-rpc on
# blockmaster.
SWB_WORKSPACE_LEASE=false
# Extra blockvolume flags, split on spaces, for example the Kubernetes gate
# flags --allow-external-*-bind, --status-recovery, --runtime-rebuild-endpoint,
# or the source-gated --durable-wal-multiblock-records.
SWB_VOLUME_EXTRA_ARGS=
# iSCSI target-side CHAP, read by blockvolume itself (same as
# --iscsi-chap-username / --iscsi-chap-secret). Requires SWB_ISCSI_LISTEN.
# Uncomment and replace both values; never use a shared or example secret.
# SW_BLOCK_ISCSI_CHAP_USERNAME=REPLACE_WITH_CHAP_USERNAME
# SW_BLOCK_ISCSI_CHAP_SECRET=REPLACE_WITH_CHAP_SECRET