Lvm Linux mount under the same name and resolve conflict
Lvm Linux mount under the same name and resolve conflict
Use the new hard disk to install the system in Linux,Installed after the original hard disk and then mount,Partition format for the system-wide default partition,The system is used by default
Is lvm format,And the default volumes are VolGroup00
Use pvs view is shown below:
[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 136.62G 0
/dev / sdb2 VolGroup00 has lvm2- 136.62G 0
Positive confirmation can not find two VG,But with the same name,How to mount it?
The solution is,The original VG renamed,Settlement of the conflict can mount。
Rename format:[You are prompted to:
[root@localhost ~]# vgrename VolGroup00 VolGroup01
Found more than one VG called VolGroup00. Please supply VG uuid.
The reason is the presence of two VolGroup00,He has modified approach prompted to specify VG uuid to。
The command to view the VG uuid:
[root@localhost ~]# vgs -v
Finding all volume groups
Finding volume group “VolGroup00”
Finding volume group “VolGroup00”
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
VolGroup00 wz–n- 32.00M 1 2 0 136.62G 0 dcHa6G-abU2-Xfq8-EPBm-jBLj-SF18-O5uH0U
VolGroup00 wz–n- 32.00M 1 2 0 136.62G 0 OF8g7h PQJB 9D9z yPxn 1kfY Advq YbNHJ9
Later found VG uuid,Execution renamed again:
[root@localhost ~]# vgrename OF8g7h-PQJB-9D9z-yPxn-1kfY-Advq-YbNHJ9 VolGroup01
Volume group “VolGroup00” still has active LVs
After successfully modified,Then perform:lvscan
[root@localhost ~]# lvscan
inactive '/ dev / VolGroup01 / LogVol00’ [130.84 GB] inherit
inactive '/ dev / VolGroup01 / LogVol01’ [5.78 GB] inherit
ACTIVE '/ dev / VolGroup00 / LogVol00’ [130.84 GB] inherit
ACTIVE '/ dev / VolGroup00 / LogVol01’ [5.78 GB] inherit
You can see the newly revised VolGroup01 is inactive status。
Then use the vgchange load VolGroup01
[root@localhost ~]# vgchange -ay /dev/VolGroup01
2 logical volume(s) in volume group “VolGroup01” now active
Finally, you can mount
[root@localhost ~]# mount /dev/VolGroup01/LogVol00 /mnt/old
At this point,Completed。
Lvm Linux mount under the same name and resolve conflict