> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://helpdesk.ggcircuit.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# ggRock 扩展你的根逻辑卷

# 🔧 扩展 ggRock 上的根逻辑卷

一些用户将其 ggRock 服务器配置有较小的根 LVM（例如 16GB 或更小）。如果日志增长迅速，这可能会导致问题——通常由 ggRock 阵列接近容量触发。扩展您的根 LVM 可以让您有额外的空间在系统性能受影响之前进行故障排除。

---

## 🧭 步骤 1 – 检查当前文件系统使用情况

运行以下命令来验证您的根 LVM 的大小和使用情况：

```
df -h /
```

示例输出：

```
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ggrock--vg-root 15G 3.7G 11G 27% /
```

在这种情况下：

* 路径：`/dev/mapper/ggrock--vg-root`
* 当前大小：`15G`
* 使用率：`27%`

---

## 📊 步骤 2 – 检查卷组中的可用空间

运行以下命令来检查卷组中有多少可用空间：

```
vgdisplay ggrock-vg
```

查找该行：

```
Free PE / Size 52434 / 204.82 GiB
```

这表示大约 200GB 的可用空间可用于扩展。

---

## ➕ 步骤 3 – 扩展根 LVM

使用 `lvextend` 命令来扩展您的根卷。在此示例中，我们添加 2GB：

```
lvextend -L +2G /dev/mapper/ggrock--vg-root -r
```

说明：

* `+2G`：增加 2GB（您可以使用 `M` 表示兆字节）
* `-r`：自动调整文件系统大小

示例输出：

```
Size of logical volume ggrock-vg/root changed from <14.90 GiB to <16.90 GiB.
Filesystem at /dev/mapper/ggrock--vg-root is now 4429824 (4k) blocks long.
```

---

## ✅ 步骤 4 – 确认新大小

重新运行原始使用情况检查：

```
df -h /
```

预期输出：

```
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ggrock--vg-root 17G 3.7G 12G 24% /
```

`Size` 列现在反映了成功的增加。

---

如果您想将其格式化为 Confluence markdown 或需要将其转换为 PDF/讲义，请告诉我！