mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
docs(block): scope state isolation to measured directory syncs
This commit is contained in:
1 parent
f4dcbbb227
commit
911890f385
2 files changed
+9
-4
No files matched your search
@@ -121,11 +121,16 @@ systemd and root access.
|
||||
filesystem. With the shipped unit, the state directory is `/var/lib/sw-block-master`, including the authority
|
||||
store and any lifecycle store. A different directory on the same filesystem is not enough.
|
||||
|
||||
v1.1.2 stops the startup's ancestor sync at the state filesystem's boundary, so a dedicated state filesystem
|
||||
isolates the startup syncs; run `sync` after creating and mounting it. This commits the installer's mount-point
|
||||
entry on its parent filesystem. A failed device lookup logs a fallback to the full ancestor walk. See
|
||||
In v1.1.2, with the state directory on its own filesystem, blockmaster's start no longer syncs any directory on the shared filesystem.
|
||||
Run `sync` after creating and mounting it. This commits the installer's mount-point entry on its parent
|
||||
filesystem. A failed device lookup logs a fallback to the full ancestor walk. See
|
||||
[directory recovery](design/lifecycle-directory-sync.md).
|
||||
|
||||
Under one buffered-write load, three starts per case measured shared-filesystem warm/cold medians of
|
||||
31.3/122.9 seconds, versus 1.6/2.5 seconds on a dedicated state filesystem; the dedicated warm maximum was
|
||||
13.2 seconds. The warm startup directory-fsync count fell from 30 to 15, with shared root-filesystem directory
|
||||
fsyncs falling from 30 to 0. These are measurements under that load, not a start-time promise.
|
||||
|
||||
**Do not mount an empty filesystem over existing blockmaster state.** It hides the existing stores
|
||||
beneath the mount, and starting blockmaster there can create a separate state history. For a new install,
|
||||
install the units (step 2 below), then create and mount the state filesystem and configure its persistent mount
|
||||
|
||||
@@ -6,7 +6,7 @@ v1.1.2 is not yet released.
|
||||
|
||||
- **Trigger:** blockmaster's state filesystem also holds 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:** v1.1.2 stops the startup's ancestor sync at the state filesystem's boundary, so a dedicated state filesystem isolates the startup syncs; run `sync` after creating and mounting it. For a new install, install the units, then mount it and configure its persistent mount and the unit's mount dependency before the first start. Migrating existing state stops service; volumes fence once the downtime outlasts their leases. Stop and disable blockmaster (with v1.1.0 volume units, stop and disable the host's volumes first), copy all state preserving ownership and permissions, verify and sync the copy, then move the unmounted original directory aside (if it is a mount point itself, unmount it, keep that filesystem as the backup, and move the directory it uncovers aside too) and create an empty mount point. Configure the persistent mount and the unit's `RequiresMountsFor` plus `AssertPathIsMountPoint` drop-in, mount the copy, verify its stores and run `sync`. Enable and start blockmaster and confirm that it opens the copied stores and reloads existing records; only then remove the moved original. Never leave stale stores beneath the mount or start against an empty replacement. Follow the [state migration steps](../operations-manual.md#1-install-the-binaries-and-units). Keep holders' data off that filesystem; a different directory on it is not enough. Restart blockmaster at low write load on the state filesystem, including when the cluster spec has not changed. If device lookup fails, a logged fallback retains the full ancestor walk.
|
||||
- **What to do:** In v1.1.2, with the state directory on its own filesystem, blockmaster's start no longer syncs any directory on the shared filesystem. Under one buffered-write load, three starts per case measured shared warm/cold medians of 31.3/122.9 seconds and dedicated medians of 1.6/2.5 seconds, with a dedicated warm maximum of 13.2 seconds. Warm directory fsyncs fell from 30 to 15; shared root-filesystem directory fsyncs fell from 30 to 0. These are measurements under that load, not a start-time promise. Run `sync` after creating and mounting it. For a new install, install the units, then mount it and configure its persistent mount and the unit's mount dependency before the first start. Migrating existing state stops service; volumes fence once the downtime outlasts their leases. Stop and disable blockmaster (with v1.1.0 volume units, stop and disable the host's volumes first), copy all state preserving ownership and permissions, verify and sync the copy, then move the unmounted original directory aside (if it is a mount point itself, unmount it, keep that filesystem as the backup, and move the directory it uncovers aside too) and create an empty mount point. Configure the persistent mount and the unit's `RequiresMountsFor` plus `AssertPathIsMountPoint` drop-in, mount the copy, verify its stores and run `sync`. Enable and start blockmaster and confirm that it opens the copied stores and reloads existing records; only then remove the moved original. Never leave stale stores beneath the mount or start against an empty replacement. Follow the [state migration steps](../operations-manual.md#1-install-the-binaries-and-units). Keep holders' data off that filesystem; a different directory on it is not enough. Restart blockmaster at low write load on the state filesystem, including when the cluster spec has not changed. If device lookup fails, a logged fallback retains the full ancestor walk.
|
||||
|
||||
## Lifecycle persistence failures
|
||||
|
||||
|
||||
Reference in new issue
Block a user