Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add english documents about smooth upgrade #5141

Merged
merged 12 commits into from
Sep 12, 2024
38 changes: 38 additions & 0 deletions docs/en/administration/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Upgrade methods vary with different JuiceFS clients.

## Mount point

### Normal upgrade

The JuiceFS client only has one binary file. So to upgrade the new version, you only need to replace the old one with the new one.

- **Use pre-compiled client**: Refer to [Install the pre-compiled client](../getting-started/installation.md#install-the-pre-compiled-client) for details.
Expand All @@ -19,6 +21,42 @@ For the file system that has been mounted using the old version of JuiceFS clien
When unmounting the file system, make sure that no application is accessing it. Otherwise the unmount will fail. Do not forcibly unmount the file system, as it may cause the application unable to continue to access it as expected.
:::

### Smooth upgrade

Starting from version v1.2, JuiceFS supports the smooth upgrade feature, which allows you to mount JuiceFS again at the same mount point to achieve a seamless client upgrade. In addition, this feature can also be used to dynamically adjust mount parameters.

Here are two common scenarios for illustration:

- Client upgrade
For example, if you have a `juicefs mount` process like `juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs -d` and want to upgrade to a new JuiceFS client without unmounting, perform the following steps:

```shell
# 1. Backup the current binary
cp juicefs juicefs.bak

# 2. Download the new binary to overwrite the current juicefs binary

# 3. Execute the juicefs mount command again to complete the smooth upgrade
juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs -d
```

- Dynamically adjusting mount parameters

For example, if you have a `juicefs mount` process like `juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs -d` and want to adjust the log level to debug without unmounting, execute the following command:

```shell
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```shell
```shell

# Adjust the log level
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Adjust the log level
# Adjust the log level

juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs --debug -d
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs --debug -d
juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs --debug -d

```

Notes:

- Smooth upgrades require both old and new JuiceFS client versions to be v1.2 or higher.

- The FUSE parameters in the new mount parameters should be consistent with the old mount parameters, otherwise the smooth upgrade will overwrite the mount at the current mount point.

- When `enable-xattr` is enabled, smooth upgrade will overwrite the mount at the current mount point.

## Kubernetes CSI Driver

Please refer to [official documentation](https://juicefs.com/docs/csi/upgrade-csi-driver) to learn how to upgrade JuiceFS CSI Driver.
Expand Down
Loading