Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 144 additions & 3 deletions content/de/installation/linux/prerequisites-and-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,156 @@ RustFS requires at least 2 GB of memory for a test environment; production envir

## Time Synchronization

Multi-node consistency requires a time server to keep clocks consistent, otherwise services may fail to start. Use tools such as `ntp`, `timedatectl`, or `timesyncd`.
Alle Knoten in einer verteilten RustFS-Deployment müssen synchronisierte Uhren aufweisen. RustFS ist auf Zeitstempel für Anfragesignaturen, Objektversionierung, verteiltes Locking und Replikation angewiesen. Eine erhebliche Uhrenabweichung zwischen Knoten kann Folgendes verursachen:

Check the synchronization status with:
- **Fehler bei Anfragesignaturen** — Die S3-Signaturprüfung erfordert genaue Zeitstempel.
- **Replikations- und Konsistenzprobleme** — Uhrenversatz kann zu veralteten oder widersprüchlichen Objektversionen führen.
- **Lock-Konflikte** — Verteilte Locks verwenden Zeitstempel für die Leasedauer.
- **Fehler beim Starten des Dienstes** — RustFS verweigert den Start, wenn der Uhrenversatz zwischen den Knoten den sicheren Schwellenwert überschreitet.

:::warning

Die Uhrenabweichung zwischen zwei Knoten darf **15 Minuten** nicht überschreiten. Für Produktionsumgebungen empfehlen wir, die Abweichung unter **1 Sekunde** zu halten.

:::

### Empfohlene NTP-Tools

Verwenden Sie auf **jedem Knoten** einen der folgenden Zeitsynchronisationsdienste. Wählen Sie ein Tool und konfigurieren Sie es einheitlich in der gesamten Deployment.

#### chrony (Empfohlen)

`chrony` ist die bevorzugte NTP-Implementierung für moderne Linux-Distributionen. Es synchronisiert schneller und geht besser mit intermittierender Netzwerkkonnektivität um als das ältere `ntpd`.

chrony installieren:

```bash
# RHEL / CentOS / Rocky Linux
sudo dnf install chrony -y

# Ubuntu / Debian
sudo apt install chrony -y
```

Bearbeiten Sie die Konfigurationsdatei `/etc/chrony.conf` (RHEL) oder `/etc/chrony/chrony.conf` (Debian/Ubuntu), um Ihre bevorzugten NTP-Server anzugeben:

```ini
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst
```

> Ersetzen Sie die Serveradressen durch die internen NTP-Server Ihrer Organisation, falls verfügbar. Die Verwendung von `iburst` beschleunigt die Erstsynchronisation.

Dienst aktivieren und starten:

```bash
sudo systemctl enable chronyd
sudo systemctl start chronyd
```

#### systemd-timesyncd

`systemd-timesyncd` ist ein leichtgewichtiger SNTP-Client, der in systemd-basierten Distributionen integriert ist. Er eignet sich für Umgebungen, in denen kein vollständiger NTP-Daemon erforderlich ist.

Bearbeiten Sie `/etc/systemd/timesyncd.conf`, um NTP-Server zu konfigurieren:

```ini
[Time]
NTP=time1.google.com time2.google.com time3.google.com time4.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org
```

Dienst aktivieren und starten:

```bash
sudo timedatectl set-ntp true
sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncd
```

#### ntpd (Veraltet)

Der klassische `ntpd` aus der NTP-Referenzimplementierung ist noch weit verbreitet. Verwenden Sie `chrony`, es sei denn, Ihre Umgebung erfordert ausdrücklich `ntpd`.

```bash
# RHEL / CentOS / Rocky Linux
sudo dnf install ntp -y

# Ubuntu / Debian
sudo apt install ntp -y
```

Bearbeiten Sie `/etc/ntp.conf`, um NTP-Server festzulegen, dann aktivieren und starten:

```bash
sudo systemctl enable ntpd
sudo systemctl start ntpd
```

### Zeitsynchronisation überprüfen

Nach der Konfiguration des NTP-Dienstes überprüfen Sie den Synchronisationsstatus auf jedem Knoten.

Systemuhr-Status prüfen:

```bash
timedatectl status
```

If the status is "synchronized", time synchronization is working properly.
Die Ausgabe sollte `System clock synchronized: yes` und `NTP service: active` anzeigen.

Für `chrony` verwenden Sie den folgenden Befehl für detaillierte Synchronisationsinformationen:

```bash
chronyc tracking
```

Wichtige Felder zur Überprüfung:

- **Leap status** — Sollte `Normal` sein (nicht `Not synchronised`).
- **System time** — Der Offset vom Referenzserver. Sollte nahe `0.000000000 seconds` liegen.
- **Root delay** — Roundtrip-Zeit zum Referenzserver.

Aktuelle NTP-Quellen und deren Status auflisten:

```bash
chronyc sources -v
```

Zu beachtende Spalten:

- **`*`** — Die aktuell gewählte Synchronisationsquelle.
- **`+`** — Andere akzeptable Quellen.
- **`-`** — Vom Auswahlalgorithmus abgelehnte Quellen.
- **`?`** — Quellen mit fraglicher Konnektivität.

Für `ntpd`:

```bash
ntpq -p
```

### Übergreifende Uhrenkonsistenz prüfen

Nachdem alle Knoten synchronisiert sind, überprüfen Sie, dass die Uhren im gesamten Cluster konsistent sind. Vergleichen Sie Zeitstempel auf jedem Knoten:

```bash
# Run on each node and compare the output
date -u '+%Y-%m-%d %H:%M:%S'
```

Für einen präziseren Vergleich installieren Sie `sshpass` und führen Folgendes aus:

```bash
for host in node1 node2 node3 node4; do
echo -n "$host: "
ssh "$host" date -u '+%Y-%m-%d %H:%M:%S.%N'
done
```

In einer korrekt konfigurierten Umgebung sollte der Unterschied zwischen zwei Knoten vernachlässigbar sein (unter 1 Millisekunde).

## Capacity Planning

Expand Down
147 changes: 144 additions & 3 deletions content/en/installation/linux/prerequisites-and-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,156 @@ RustFS requires at least 2 GB of memory for a test environment; production envir

## Time Synchronization

Multi-node consistency requires a time server to keep clocks consistent, otherwise services may fail to start. Use tools such as `ntp`, `timedatectl`, or `timesyncd`.
All nodes in a RustFS distributed deployment **must** maintain synchronized clocks. RustFS relies on timestamps for request signing, object versioning, distributed locking, and replication. Significant clock drift between nodes can cause:

Check the synchronization status with:
- **Request signing failures** — S3 signature verification depends on accurate timestamps.
- **Replication and consistency issues** — Clock skew can lead to stale or conflicting object versions.
- **Lock contention problems** — Distributed locks use timestamps for lease expiration.
- **Service startup failures** — RustFS refuses to start if clock skew between nodes exceeds safe thresholds.

:::warning

Clock drift between any two nodes should not exceed **15 minutes**. For production environments, we recommend keeping drift under **1 second**.

:::

### Recommended NTP Tools

Use any of the following time synchronization services on **every** node. Choose one and configure it consistently across the deployment.

#### chrony (Recommended)

`chrony` is the preferred NTP implementation for modern Linux distributions. It synchronizes faster and handles intermittent network connectivity better than legacy `ntpd`.

Install chrony:

```bash
# RHEL / CentOS / Rocky Linux
sudo dnf install chrony -y

# Ubuntu / Debian
sudo apt install chrony -y
```

Edit the configuration file `/etc/chrony.conf` (RHEL) or `/etc/chrony/chrony.conf` (Debian/Ubuntu) to point to your preferred NTP servers:

```ini
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst
```

> Replace the server addresses with your organization's internal NTP servers if available. Using `iburst` speeds up initial synchronization.

Enable and start the service:

```bash
sudo systemctl enable chronyd
sudo systemctl start chronyd
```

#### systemd-timesyncd

`systemd-timesyncd` is a lightweight SNTP client built into systemd-based distributions. It is suitable for environments where a full NTP daemon is not required.

Edit `/etc/systemd/timesyncd.conf` to configure NTP servers:

```ini
[Time]
NTP=time1.google.com time2.google.com time3.google.com time4.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org
```

Enable and start the service:

```bash
sudo timedatectl set-ntp true
sudo systemctl enable systemd-timesyncd
sudo systemctl start systemd-timesyncd
```

#### ntpd (Legacy)

The classic `ntpd` from the NTP reference implementation is still widely available. Use `chrony` instead unless your environment specifically requires `ntpd`.

```bash
# RHEL / CentOS / Rocky Linux
sudo dnf install ntp -y

# Ubuntu / Debian
sudo apt install ntp -y
```

Edit `/etc/ntp.conf` to set your NTP servers, then enable and start:

```bash
sudo systemctl enable ntpd
sudo systemctl start ntpd
```

### Verifying Time Synchronization

After configuring your NTP service, verify synchronization on each node.

Check the system clock status:

```bash
timedatectl status
```

If the status is "synchronized", time synchronization is working properly.
The output should show `System clock synchronized: yes` and `NTP service: active`.

For `chrony`, use the following command to check detailed synchronization status:

```bash
chronyc tracking
```

Key fields to verify:

- **Leap status** — Should be `Normal` (not `Not synchronised`).
- **System time** — The offset from the reference server. Should be close to `0.000000000 seconds`.
- **Root delay** — Round-trip time to the reference server.

To list the current NTP sources and their status:

```bash
chronyc sources -v
```

Columns to watch:

- **`*`** — The currently selected synchronization source.
- **`+`** — Other acceptable sources.
- **`-`** — Sources rejected by the selection algorithm.
- **`?`** — Sources whose connectivity is in question.

For `ntpd`, use:

```bash
ntpq -p
```

### Verifying Cross-Node Clock Consistency

After all nodes are synchronized, verify that clocks are consistent across the cluster. On each node, compare timestamps:

```bash
# Run on each node and compare the output
date -u '+%Y-%m-%d %H:%M:%S'
```

For a more precise comparison, install `sshpass` and run:

```bash
for host in node1 node2 node3 node4; do
echo -n "$host: "
ssh "$host" date -u '+%Y-%m-%d %H:%M:%S.%N'
done
```

The difference between any two nodes should be negligible (under 1 millisecond in a well-configured environment).

## Capacity Planning

Expand Down
Loading
Loading