CentOS LVM partition repair mounting

Source: Internet
Author: User

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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.