LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-18-2011, 01:24 PM   #1
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 6.8 & 7, Linux Mint
Posts: 66
Blog Entries: 1

Rep: Reputation: 15
LVM repair via /etc/lvm files?


Hello all,

I botched up adding storage to an existing volume group. The original volume is still intact and working fine, but the management utilities show I have an "unknown physical volume" as part of the group. That happened because I did things out of order and dropped a partition with fdisk before removing in LVM. So now it says it can't remove the volume because it can't find device with UUID Mt6....... .

Am I correct in thinking that if I restore a *.vg file that describes the lvm state before the botch up from /etc/lvm/archive to /etc/lvm/backup, then re-start the system, I'll be able to find and remove UUID Mt6....... and then start over doing things in the proper order?

I want to get rid of the "unknown device" record and add the "New Physical Volume" at /dev/sdb1 to the volume group. I'm concerned about adding the new pv with the bogus record still in place. I need this volume group to be stable!

Attached is a txt file with output from "dmsetup info" and "pvdisplay".

I'm running a CentOS 5.4 server. Any help is appreciated, thanks!
Attached Files
File Type: txt lvm_output.txt (1.8 KB, 22 views)
 
Old 05-18-2011, 03:54 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

I have performed the following test:

1. pvcreate /dev/sdd1
2. pvcreate /dev/sdd2
3. vgcreate test /dev/sdd1 /dev/sdd2
4. lvcreate -L +1800M -n lvtest test
5. Deleted /dev/sdd2 by fdisk and then I started getting unknown device in pvdisplay

Tried the following command and it worked!!!

vgreduce --removemissing --force volume_group_name

If this is your production system then please do take a full backup before running this command. I tried it on my test system and it did work out fine without any issues and my system is able to see all vgs and pvs but still I would recommend you to take full backup.
 
1 members found this post helpful.
Old 05-19-2011, 09:46 AM   #3
Ezplan
Member
 
Registered: Dec 2003
Location: MA
Distribution: CentOS 6.8 & 7, Linux Mint
Posts: 66

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Talking WOW!

Not only advice, but TESTED advice!
Thank you very much. That worked out perfectly! Everything intact and functioning smoothly!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repair corrupt partition on LVM Peter Bushnell Linux - General 3 05-09-2010 02:15 AM
repair failed lvm partition aclhkaclhk Linux - Hardware 1 09-08-2009 11:45 PM
Recover LVM after Fed11 repair screwed me up!!! ericcarlson Fedora 3 09-01-2009 04:37 AM
Repair ReiserFS on LVM after removal of one or more PV's MrGrand Linux - Software 0 04-01-2009 06:30 AM
Repair LVM partition megerdin Linux - Newbie 7 02-24-2009 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration