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

1 Comment »

  1. jesse said,
    October 7, 2010 @ pm 5:51

    Can’t connect to local MySQL server through socket 解决办法
    关键字: mysql server through socket
    启动mysql 报错

    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/temp/mysql.sock’ (2)

    1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.
    另外看看是不是权限问题.

    2、确定你的mysql.sock是不是在那个位置
    mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock

    3、试试:service mysqld start

    4、如果是权限问题则先改变权限 #chown -R mysql:mysql /var/lib/mysql

    [root@localhost ~]# /etc/init.d/mysqld start
    启动 MySQL: [ 确定 ]
    [root@localhost ~]# mysql -uroot -p

Leave a Comment