LVM issue: Couldn't find device with uuid...

超级网迷+ 电脑迷+ 音乐迷
打印 被阅读次数

When my Red Hat 6 was booting up, the following errors show up on the screen:

"Couldn't find device with uuid ...
Refusing activation of partial LV ... Use --partial to override."

This means, for whatever reason, LVM need repairs. In my case, I have no data to recover.
So here are the steps:

1) Use a bootable CD/USB to boot the system. I highly recommend SystemRescueCd (latest version 2.3.1), which is available for download from sourceforge. This is a must-have tool.

2) Mount the local disk, and modify etc/fstab. Comment out the problem entry for mounting logical volume group(s).  Then reboot the system.

3) The device in question is /dev/sdc in my case. The following command can remove it from the volume group:

[root@rh6srv Desktop]# vgreduce --removemissing south_group
Couldn't find device with uuid l78hi7-d6eb-cMbN-kTnc-r3ik-c6X1-gPmqQJ.
WARNING: Partial LV lv_south_group needs to be repaired or removed.
WARNING: There are still partial LVs in VG south_group.
To remove them unconditionally use: vgreduce --removemissing --force.
Proceeding to remove empty missing PVs.


4) "Force" is the way to go :(

[root@rh6srv Desktop]# vgreduce --removemissing south_group --force
Couldn't find device with uuid l78hi7-d6eb-cMbN-kTnc-r3ik-c6X1-gPmqQJ.
lv_south_group is expected to have only one segment using it, while it has 0
Failed to find mirror_seg for lv_south_group
Wrote out consistent volume group south_group

5) Now device does not belong to any group. You can use LVM tool to check and see if the device is in the list of Uninitialized Entities. If not, you have to re-partition and format the device.

6) The rest is easy. Just initialize the device (/dev/sdc) and join it to the volume group (south_group in my case).

7) Job is done.

2011.08.27

登录后才可评论.