mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
seaweed-block: docs: warn about restart delays on busy state filesystems (#13472)
* docs: document blockmaster restart delays on busy filesystems * docs: correct measured startup range and lease safety explanation * docs: explain filesystem-wide import sync wait * docs: clarify import sync applies per changed store * docs: qualify restart continuity and ancestor sync exposure
This commit is contained in:
1 parent
759b7f3a36
commit
7d960d01a3
3 files changed
+36
-2
No files matched your search
@@ -117,6 +117,22 @@ systemd and root access.
|
||||
|
||||
## 1. Install the binaries and units
|
||||
|
||||
**Plan blockmaster's state storage before starting it.** Keep the holders' local data off both the state
|
||||
directory's filesystem and the filesystem holding its ancestors. In practice, put the holders' data on its own
|
||||
filesystem, not the root filesystem. With the shipped unit, the state directory is `/var/lib/sw-block-master`,
|
||||
including the authority and lifecycle stores. A different directory on the same filesystem is not enough. A
|
||||
dedicated state-directory mount alone does not isolate every startup sync: opening the store also syncs ancestor
|
||||
directories up to `/`, including `/var/lib` and `/var` with this layout. Keep write load low on those filesystems
|
||||
when restarting too. Under heavy writes, an `fsync` when blockmaster opens its state directory can wait for the
|
||||
filesystem journal. In v1.1.2, startup also runs a `syncfs` for each store with changed import records on ext4, XFS,
|
||||
btrfs or tmpfs (Linux 5.8 or later), which waits for every pending write on that filesystem, including the holders'
|
||||
data. Starts took from about 20 seconds to over 150 seconds in our tests (one start was not ready after 2 minutes);
|
||||
this is not an upper bound. A volume whose lease expires stops serving until blockmaster is back; it is then
|
||||
granted again on the same holder, with its data. A forced move during that time can lose writes after the last
|
||||
published HEAD (see [forced move](volume-lifecycle.md#after-a-crash)).
|
||||
Restart blockmaster at low write load, including when the cluster spec has not changed. See the
|
||||
[restart known issue](releases/v1.1.1.md#known-issue-blockmaster-restart-can-stall-on-a-busy-filesystem).
|
||||
|
||||
1. **Get the repository at the release tag, then the binaries.** The repository holds the units in `deploy/`. The
|
||||
binaries are `blockmaster`, `blockvolume` and `sw-block`, all three from the same release. `TAG` is the release,
|
||||
for example `v1.1.1`. Download the release tarball and check it:
|
||||
@@ -240,7 +256,8 @@ with its size and home placement. A volume's record comes from the cluster spec:
|
||||
```
|
||||
|
||||
blockmaster reads the cluster spec only when it starts. After editing the spec, run
|
||||
`sudo systemctl restart sw-blockmaster`. Serving volumes keep serving across that restart.
|
||||
`sudo systemctl restart sw-blockmaster`. A restart that outlasts the running volumes' leases makes them fence;
|
||||
follow the state-storage and low-write-load guidance in section 1 before restarting.
|
||||
|
||||
blockmaster must run under systemd or an equivalent restart supervisor. A node, placement
|
||||
or volume lifecycle record write or recovery-directory sync failure attempts one `ERROR` naming the store,
|
||||
@@ -579,7 +596,9 @@ writing the v1.0 format until you finalize. Until then you can go back.
|
||||
sw-block cluster format-level --master 127.0.0.1:9180 # format level 0
|
||||
```
|
||||
|
||||
Volumes keep serving.
|
||||
Volumes keep serving only if the restart completes before their leases expire; otherwise they fence.
|
||||
Follow the [state-storage and low-write-load restart guidance](#1-install-the-binaries-and-units), including
|
||||
during upgrades.
|
||||
|
||||
4. **Each holder.** Install the new binary once per host, then restart each volume on that host:
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ v1.1.1 is a fix release of the v1.1 line. None of its changes alters a stored fo
|
||||
- **Where it starts:** we estimate around 150 declared volumes; it depends on the disk under blockmaster's state directory.
|
||||
- **What to do:** restart blockmaster in a maintenance window if a cluster declares more than about 150 volumes. A fix is planned for v1.1.2; in our test with it, 999 volumes restarted in under 6 s including the stop, and no volume stopped.
|
||||
|
||||
## Known issue: blockmaster restart can stall on a busy filesystem
|
||||
|
||||
- **Trigger:** blockmaster's state directory or its ancestors share a filesystem with heavy writes, such as the holders' local data.
|
||||
- **Effect:** opening the state directory calls `fsync`, which can wait for the filesystem journal. In v1.1.2, when the import has changed records, startup also runs a `syncfs` for each store with changed records on ext4, XFS, btrfs or tmpfs (Linux 5.8 or later), which waits for every pending write on that filesystem, including the holders' data. Starts took from about 20 seconds to over 150 seconds in our tests (one start was not ready after 2 minutes); this is not an upper bound. A volume whose lease expires stops serving until blockmaster is back; it is then granted again on the same holder, with its data. A forced move during that time can lose writes after the last published HEAD (see [forced move](../volume-lifecycle.md#after-a-crash)).
|
||||
- **What to do:** keep the holders' data off both the state directory's filesystem and the filesystem holding its ancestor directories. In practice, put the holders' data on its own filesystem, not the root filesystem. A different directory on the same filesystem is not enough. A dedicated state-directory mount alone does not isolate every startup sync: opening the store also syncs ancestors up to `/`, including `/var/lib` and `/var` with the shipped layout. Restart blockmaster at low write load on all those filesystems. This limitation also applies when the cluster spec has not changed.
|
||||
|
||||
## Known issue: blockmaster needs its filer to start
|
||||
|
||||
- blockmaster checks that its SeaweedFS filer answers before it starts. If the filer is unreachable, blockmaster stops with an error after about 60 s instead of starting.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# v1.1.2
|
||||
|
||||
v1.1.2 is not yet released.
|
||||
|
||||
## Known issue: blockmaster restart can stall on a busy filesystem
|
||||
|
||||
- **Trigger:** blockmaster's state directory or its ancestors share a filesystem with heavy writes, such as the holders' local data.
|
||||
- **Effect:** blockmaster's start syncs its state directories, which can wait for the filesystem journal. When the import has changed records, it also runs a `syncfs` for each store with changed records on ext4, XFS, btrfs or tmpfs (Linux 5.8 or later), which waits for every pending write on that filesystem, including the holders' data. Starts took from about 20 seconds to over 150 seconds in our tests (one start was not ready after 2 minutes); this is not an upper bound. A volume whose lease expires stops serving until blockmaster is back; it is then granted again on the same holder, with its data. A forced move during that time can lose writes after the last published HEAD (see [forced move](../volume-lifecycle.md#after-a-crash)).
|
||||
- **What to do:** keep the holders' data off both the state directory's filesystem and the filesystem holding its ancestor directories. In practice, put the holders' data on its own filesystem, not the root filesystem. A different directory on the same filesystem is not enough. A dedicated state-directory mount alone does not isolate every startup sync: opening the store also syncs ancestors up to `/`, including `/var/lib` and `/var` with the shipped layout. Restart blockmaster at low write load on all those filesystems. This limitation also applies when the cluster spec has not changed.
|
||||
Reference in new issue
Block a user