Understanding mgr-storage-server and mgr-storage-proxy

mgr-storage-server and mgr-storage-proxy are helper scripts provided with SUSE Multi-Linux Manager 5.0 and later.

它们用于为 SUSE Multi-Linux Manager 服务器和代理指定存储配置。

The scripts take disk devices as arguments. mgr-storage-proxy requires a single argument for the storage disk device. mgr-storage-server requires a storage disk device and can optionally accept a second argument for a dedicated database disk device. While both normal and database storage can reside on the same disk, it is advisable to place the database on a dedicated, high-performance disk to ensure better performance and easier management.

1. 这些工具的功能

Both mgr-storage-server and mgr-storage-proxy perform standard storage setup operations:

  • 验证提供的存储设备。

  • 确保设备为空且适合使用。

  • 在指定设备上创建 XFS 文件系统。

  • 临时挂载设备以进行数据迁移。

  • 将相关存储目录迁移到新设备。

  • Create entries in /etc/fstab so that the storage mounts automatically on boot.

  • 将设备重新挂载到最终位置。

Table 1. 工具的专属特性

mgr-storage-server

Optionally supports a separate device for database storage.

Stops SUSE Multi-Linux Manager services during migration, restarts them afterward.

Moves Podman volumes directory /var/lib/containers/storage/volumes to the prepared storage, and optionally /var/lib/containers/storage/volumes/var-pgsql to the prepared database storage.

mgr-storage-proxy

Focuses only on proxy storage (no database storage support).

Stops and restarts the proxy service during migration.

Moves podman volumes directory /var/lib/containers/storage/volumes to the prepared storage.

这两个工具均会自动执行标准的 Linux 存储操作,不存在 Linux 管理员手动操作之外的隐藏逻辑或自定义逻辑。

2. 这些工具具备的功能

  • 不会创建或管理 LVM 卷。

  • 不会配置 RAID 或复杂存储拓扑。

  • 不会阻止您在完成设置后使用常规 Linux 工具管理存储设备。

  • 提供动态调整大小或扩展功能 — 这些操作必须通过标准 Linux 存储工具完成。

3. 安装后的存储管理

完成存储配置后,您可通过标准 Linux 命令安全地管理存储设备。

3.1. 示例

Listing 1. 示例 1:扩展存储容量(如果使用 LVM)
lvextend -L +10G /dev/your_vg/your_lv
xfs_growfs /var/lib/containers/storage/volumes
示例 2:迁移到更大容量的磁盘
  1. 添加并格式化新磁盘。

  2. 临时挂载新磁盘。

  3. 使用 rsync 复制数据。

  4. 更新 /etc/fstab

  5. 将新磁盘重新挂载到适当位置。

4. 适用与不适用场景

更改存储设置前,务必创建备份。

  • 在初始存储设置或迁移到新存储设备(需要使用工具处理数据迁移和更新 /etc/fstab)时使用这些工具。

  • Do not rerun these scripts for resizing or expanding storage. Use standard Linux tools (e.g., lvextend, xfs_growfs) for such operations.

5. 总结

mgr-storage-server and mgr-storage-proxy help automate the initial persistent storage setup for SUSE Multi-Linux Manager components using standard Linux storage practices. They do not limit or interfere with standard storage management afterward.

完成设置后,您可继续使用熟悉的 Linux 工具管理存储设备。

A full database volume can cause significant issues with system operation. As disk usage notifications have not yet been adapted for containerized environments, users are encouraged to monitor the disk space used by Podman volumes themselves, either through tools such as Grafana, Prometheus, or any other preferred method. Pay particular attention to the var-pgsql volume, located under /var/lib/containers/storage/volumes/.