This commit is contained in:
colben
2026-02-27 14:22:17 +08:00
parent abcf9b33d3
commit 8692391d18

View File

@@ -238,7 +238,7 @@ incus3 | eth0: 192.168.1.3 | 10.10.10.3 | /dev/sdb | 10.10.10.3 incus3
- **经测试,需要手动创建存储池和受管网络,否则后面其他 incus 节点加入集群失败** - **经测试,需要手动创建存储池和受管网络,否则后面其他 incus 节点加入集群失败**
- 创建存储池 pool1 - 创建存储池 pool1
```BASH ```BASH
incus storage create pool1 lvm source=incusvg incus storage create pool1 lvm source=incusvg lvm.use_thinpool=false
``` ```
- 创建受管网络 incusbr99 - 创建受管网络 incusbr99
@@ -247,50 +247,50 @@ incus3 | eth0: 192.168.1.3 | 10.10.10.3 | /dev/sdb | 10.10.10.3 incus3
``` ```
### 加入集群 ### 加入集群
- **在 incus2** 里初始化 incus
```BASH
incus admin init
```
- **在 incus1** 里生成加入 incus2 的令牌 - **在 incus1** 里生成加入 incus2 的令牌
```BASH ```BASH
incus cluster add incus2 incus cluster add incus2
# 复制这里输出的令牌字符串,用于回答 incus2 加入集群的 token # 复制这里输出的令牌字符串,用于回答 incus2 加入集群的 token
``` ```
- **返回 incus2**,按提示回答初始化交互命令,大概回答内容如下 - ** incus2 里执行下面操作**
- 初始化 incus
```BASH
incus admin init
```
- 按提示回答初始化交互命令,大概回答内容如下
``` ```
Would you like to use clustering? (yes/no) [default=no]: yes Would you like to use clustering? (yes/no) [default=no]: yes
What IP address or DNS name should be used to reach this server? [default=10.10.10.2]: What IP address or DNS name should be used to reach this server? [default=10.10.10.2]:
Are you joining an existing cluster? (yes/no) [default=no]: yes # 加入已有的集群 Are you joining an existing cluster? (yes/no) [default=no]: yes # 加入已有的集群
Please provide join token: xxxxxxxx # 这里是 incus1 里生成的令牌 Please provide join token: xxxxxxxx # 这里是 incus1 里生成的令牌
All existing data is lost when joining a cluster, continue? (yes/no) [default=no] yes All existing data is lost when joining a cluster, continue? (yes/no) [default=no] yes
Choose "lvm.thinpool_name" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg Choose "lvm.vg_name" property for storage pool "pool1": # 默认
Choose "lvm.vg_name" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg
Choose "source" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg Choose "source" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg
Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]: Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]:
``` ```
- **在 incus3** 里初始化 incus
```BASH
incus admin init
```
- **在 incus1** 里生成加入 incus3 的令牌 - **在 incus1** 里生成加入 incus3 的令牌
```BASH ```BASH
incus cluster add incus3 incus cluster add incus3
# 复制这里输出的令牌字符串,用于回答 incus3 加入集群的 token # 复制这里输出的令牌字符串,用于回答 incus3 加入集群的 token
``` ```
- **返回 incus3**,按提示回答初始化交互命令,大概回答内容如下 - ** incus3 里执行下面操作**
- 初始化 incus
```BASH
incus admin init
```
- 按提示回答初始化交互命令,大概回答内容如下
``` ```
Would you like to use clustering? (yes/no) [default=no]: yes Would you like to use clustering? (yes/no) [default=no]: yes
What IP address or DNS name should be used to reach this server? [default=10.10.10.3]: What IP address or DNS name should be used to reach this server? [default=10.10.10.3]:
Are you joining an existing cluster? (yes/no) [default=no]: yes # 加入已有的集群 Are you joining an existing cluster? (yes/no) [default=no]: yes # 加入已有的集群
Please provide join token: xxxxxxxx # 这里是 incus1 里生成的令牌 Please provide join token: xxxxxxxx # 这里是 incus1 里生成的令牌
All existing data is lost when joining a cluster, continue? (yes/no) [default=no] yes All existing data is lost when joining a cluster, continue? (yes/no) [default=no] yes
Choose "lvm.thinpool_name" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg Choose "lvm.vg_name" property for storage pool "pool1": # 默认
Choose "lvm.vg_name" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg
Choose "source" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg Choose "source" property for storage pool "pool1": incusvg # 存储用 lvm 卷组 incusvg
Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]: Would you like a YAML "init" preseed to be printed? (yes/no) [default=no]:
``` ```