Archive for October 7, 2010

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

Comments (1)

mount挂载硬盘出错mount you must specify the filesystem type lvm?

[root@all /]# fdisk -l
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 9729 78043770 8e Linux LVM

Disk / dev / hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 255 2048256 83 Linux
/dev/hda2 256 3934 29551567+ 83 Linux
/dev/hda3 3935 4444 4096575 83 Linux
/dev/hda4 4445 4865 3381682+ f Win95 Ext’d (LBA)
/dev/hda5 4445 4699 2048256 83 Linux
/dev/hda6 4700 4801 819283+ 83 Linux
/dev/hda7 4802 4865 514048+ 82 Linux swap
[root@all /]# mount /dev/hdc2 /mnt/cdrom
mount: you must specify the filesystem type
mount outlet when the above error!Who gives a hint!Thank you!

Reply:

1.First with vgscan
2.vgchange -ay
3.lvscan
4.mount

To the third step of the time it will show if the normal state lv two hard drives are active,Until then

#mount -t ext3 /dev/VGname/LVname /mnt/cdrom

You can be successful。

This article comes from CSDN blog,Reproduced, please indicate the source:http://blog.csdn.net/qiudakun/archive/2010/03/01/5336754.aspx

Comments