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
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

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:

1. Client Upgrade
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved
For example, if there is a `juicefs mount` process `juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs -d`, and you want to deploy a new JuiceFS client without unmounting the mount point, you can perform the following steps:
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

```shell
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved
# 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
```

2. Dynamically Adjust Mount Parameters
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

For example, if there is a `juicefs mount` process `juicefs mount redis://127.0.0.1:6379/0 /mnt/jfs -d`, and you want to adjust the log level to debug without unmounting the mount point, you can execute the following command:
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

```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

```
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

Some notes:
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

1. The smooth upgrade requires that the JuiceFS client versions of both the old and new processes are at least v1.2.
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

2. The FUSE parameters in the new mount parameters should be consistent with the old mount parameters, otherwise the smooth upgrade will continue to overwrite the mount at the current mount point.
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

3. When `enable-xattr` is turned on, the smooth upgrade will continue to overwrite the mount at the current mount point.
zhijian-pro marked this conversation as resolved.
Show resolved Hide resolved

## 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