on it road .com

操作步骤

  1. 卸载目录。
# umount /data01
  1. 停用设备上的活动 LV。
# lvchange -a n /dev/data_vg/lv_data01
  1. 将 VG 拆分为新的临时 VG 并重新扫描 PV
# vgsplit data_vg tempvg PV
# pvscan

pvscan 命令将列出可用的 PV 及其 VG。

  1. 将tempvg合并到目标VG
# vgmerge dest_vg tempvg
# pvscan
  1. 在 pvscan 命令中正确列出所有内容后,激活 LV。
# lvscan
# lvchange -a n /dev/dest_vg/lv_data01
  1. 正确安装 LV。
# mount -t [filesystem_type] /device /dir
CentOS/RHEL:如何将物理卷从现有卷组移动到另一个卷组

这篇文章描述了如何将物理卷从现有卷组移动到另一个现有卷组。
这有助于将 PV 中的数据移动到新的 VG,而无需进行任何手动迁移。

在移动 PV 之前,我们应该确保在此类 PV 之上创建的逻辑卷不与其他 PV 共享物理范围。
我们可以使用下面给出的命令找到 LV 的范围和设备;

# lvdisplay -m
日期:2020-09-17 00:12:17 来源:oir作者:oir