Skip to content

Commit 545cd95

Browse files
committed
docs: document guest network and disk policies
1 parent 259ce64 commit 545cd95

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

content/blog/design/fixed-ip-two-nics.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ interfaces.
2424
| Interface | Addressing | Responsibility |
2525
| --- | --- | --- |
2626
| management | QEMU user-mode NAT, DHCP | DNS, default route, outbound internet, and loopback SSH fallback |
27-
| `private0` | fixed Inventory address | host-to-node, node-to-node, Ansible, Pigsty services, and VIP traffic |
27+
| private, MAC-matched | fixed Inventory address | host-to-node, node-to-node, Ansible, Pigsty services, and VIP traffic |
28+
29+
Farrow matches both physical interfaces by their deterministic MAC addresses
30+
and does not rename them. Guest-visible names are whatever the image's network
31+
stack chooses (commonly `eth0` or `enp0s4`); the MAC and address contract, not
32+
the display name, determines each interface's role.
2833

2934
The management interface is deliberately ordinary. It lets a new cloud image
3035
reach package repositories before any application exists, without installing

content/blog/design/fixed-ip-two-nics.zh.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ PostgreSQL 暴露给宿主,却无法把这种网络身份提供给其它节点
2121
| 网卡 | 地址方式 | 职责 |
2222
| --- | --- | --- |
2323
| 管理网卡 | QEMU User-mode NAT、DHCP | DNS、默认路由、互联网出站与回环 SSH 备用路径 |
24-
| `private0` | Inventory 固定地址 | 宿主到节点、节点间、Ansible、Pigsty 服务与 VIP 流量 |
24+
| 私网网卡(按 MAC 匹配) | Inventory 固定地址 | 宿主到节点、节点间、Ansible、Pigsty 服务与 VIP 流量 |
25+
26+
Farrow 使用确定的 MAC 地址匹配两张物理网卡,不再修改它们的名称。Guest 中看到的名字由镜像
27+
自身的网络栈决定(通常是 `eth0``enp0s4`);网卡角色由 MAC 与地址契约决定,而不是显示名称。
2528

2629
管理网卡刻意保持普通:一张新的 Cloud Image 在应用尚未安装前就能访问软件仓库,宿主无需
2730
安装 NAT 规则或 DHCP 服务。

content/docs/reference/configuration.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,14 @@ architecture also needs its matching `qemu-system-*` binary and firmware.
7878
vm_disks:
7979
- path: /data
8080
size: 128
81-
fs: xfs
81+
fs: auto
8282
persistent: false
8383
```
8484

85-
`path` is the disk identity and mount point. `fs` is `xfs` or `ext4`.
85+
`path` is the disk identity and mount point. `fs` is `auto`, `xfs`, or `ext4`;
86+
omitting it retains the released `xfs` default. An explicitly selected `auto`
87+
disk uses XFS when `mkfs.xfs` is available and otherwise uses ext4. Explicit
88+
`xfs` and `ext4` never fall back, and an existing filesystem is preserved.
8689
`persistent: true` survives normal destroy. Use `vm_disks: []` for no extra
8790
disk.
8891

content/docs/reference/configuration.zh.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@ Linux setup 只安装宿主原生模拟器;外来架构还需要对应 `qemu-s
6868
vm_disks:
6969
- path: /data
7070
size: 128
71-
fs: xfs
71+
fs: auto
7272
persistent: false
7373
```
7474

75-
`path` 同时是磁盘身份与挂载点;`fs` 为 `xfs` 或 `ext4`。`persistent: true` 在普通
76-
destroy 后保留;`vm_disks: []` 表示不要额外盘。
75+
`path` 同时是磁盘身份与挂载点;`fs` 为 `auto`、`xfs` 或 `ext4`,省略时保持已发布的
76+
`xfs` 默认值。显式选择的空白 `auto` 磁盘在 `mkfs.xfs` 可用时优先使用 XFS,否则
77+
使用 ext4;显式 `xfs`、`ext4` 不会降级,已有文件系统保持不变。`persistent: true`
78+
在普通 destroy 后保留;`vm_disks: []` 表示不要额外盘。
7779

7880
## 目录共享
7981

0 commit comments

Comments
 (0)