1.首先使用vgscan 扫描 lvm 结果如下
[root@server /]# vgscan
Reading all physical volumes. This may take a while…
Found volume group "VolGroup" using metadata type lvm2
Found volume group "VolGroup" using metadata type lvm2
2.通过 vgdisplay VolGroup 查看 lvm 的 VG UUID
[root@server /]# vgdisplay VolGroup
— Volume group —
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 111.10 GiB
PE Size 4.00 MiB
Total PE 28442
Alloc PE / Size 28442 / 111.10 GiB
Free PE / Size 0 / 0
VG UUID utcCcc-3RY9-lIac-pfPe-3LQz-blqV-43QBhP
可以看出当前操作系统使用的VolGroup的 VG UUID 是utcCcc-3RY9-lIac-pfPe-3LQz-blqV-43QBhP
[root@server /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 VolGroup lvm2 a– 111.10g 0
/dev/sdb2 VolGroup lvm2 a– 111.30g 0
可以看到vg重名了
然后要改名字
[root@server /]# vgrename iMo92U-YG6l-0BSW-ouMF-yVij-9pXb-VbjZm2 VolGroup01
Volume group "VolGroup" successfully renamed to "VolGroup01"
[root@server /]# lvscan
inactive ‘/dev/VolGroup01/lv_root’ [50.00 GiB] inherit
ACTIVE ‘/dev/VolGroup01/lv_home’ [57.53 GiB] inherit
inactive ‘/dev/VolGroup01/lv_swap’ [3.77 GiB] inherit
ACTIVE ‘/dev/VolGroup/lv_root’ [50.00 GiB] inherit
inactive ‘/dev/VolGroup/lv_home’ [57.34 GiB] inherit
ACTIVE ‘/dev/VolGroup/lv_swap’ [3.77 GiB] inherit
这样就识别出来了。
激活挂载即可
[root@server /]# vgchange -ay /dev/VolGroup01
3 logical volume(s) in volume group "VolGroup01" now active
最后mount即可
[root@localhost ~]# mount /dev/VolGroup01/LogVol00 /data/www
评论前必须登录!
注册