>Recover LVM from Corrupted physical volume

By | December 23, 2010

>I had Volume Group /dev/vg1 that consist two physical volumes /dev/sdb1 and /dev/sdc1 . One of physical volume /dev/sdc1, corrupted due to disk problem , now the challenge was to recover LVM. I decided to use pvremove command, in following way
    root#pvremove /dev/sdc1
Above command displayed error couldn’t find device uuid ‘xxxxxxx’
Then issue tried forcefully
   root#pvremove -ff /dev/sdc1
After some warning, it removed that physical volume.
Then i issued pvdisplay command
This display message  ‘ Couldn’t find device with uuid xxxxxx

Now what you need to do is to create a physical volume with new disk with missing uuid .
For that following command can be used

root# pvcreate –uuid=xxxxxx /dev/sdd1 –restorefile=/etc/lvm/archive/vg0_0.vg

Where /dev/sdd1 is new hard disk in replace of /dev/sdc1
Then restore the vg metadata with following command
root# vgcfgrestore -f /etc/lvm/archive/vg0_0.vg tvg0
Note: check archive of vg in /etc/lvm/archive

Share itShare on FacebookEmail this to someoneTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *

Current month ye@r day *