In Linux, use a new hard disk to install the system. After the system is installed, mount the original hard disk. The partition format is all the default partitions of the system.
It is in lvm format, and the default volume is VolGroup00.
Use pvs to view the following information:
[root@localhost ~]# pvsPV VG Fmt Attr PSize PFree/dev/sda2 VolGroup00 lvm2 a- 136.62G 0/dev/sdb2 VolGroup00 lvm2 a- 136.62G 0
I found that I can identify two VG correctly, but I have the same name. How can I mount it?
The solution is to rename the original VG and mount it after resolving the conflict.
Rename: vgrename VolGroup00 VolGroup01
The following message is displayed:
[root@localhost ~]# vgrename VolGroup00 VolGroup01Found more than one VG called VolGroup00. Please supply VG uuid.
The reason is that there are two VolGroup00 instances. The modified method prompts you to specify the VG uuid.
Run the following command to view the VG uuid:
[root@localhost ~]# vgs -vFinding all volume groupsFinding volume group “VolGroup00″Finding volume group “VolGroup00″VG Attr Ext #PV #LV #SN VSize VFree VG UUIDVolGroup00 wz–n- 32.00M 120 136.62G 0 dcHa6G-abU2-Xfq8-EPBm-jBLj-sf18-O5uH0UVolGroup00 wz–n- 32.00M 120 136.62G 0 OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9
After the VG uuid is found, rename it again:
[root@localhost ~]# vgrename OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9 VolGroup01Volume group “VolGroup00″ still has active LVs
After the modification is successful, run: lvscan
[root@localhost ~]# lvscaninactive ‘/dev/VolGroup01/LogVol00′ [130.84 GB] inheritinactive ‘/dev/VolGroup01/LogVol01′ [5.78 GB] inheritACTIVE ‘/dev/VolGroup00/LogVol00′ [130.84 GB] inheritACTIVE ‘/dev/VolGroup00/LogVol01′ [5.78 GB] inherit
The modified VolGroup01 is inactive.
Use vgchange to load VolGroup01
[root@localhost ~]# vgchange -ay /dev/VolGroup012 logical volume(s)in volume group “VolGroup01″ now active
Last mount
[root@localhost ~]# mount /dev/VolGroup01/LogVol00 /mnt/old
Now, all are completed.
Mount lvm in Linux and resolve conflicts with the same name
Fsck-y