LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2013, 05:11 PM   #1
s1syphus
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
Trouble Restoring LVM Volume Group


Hi, I'm having a problem using vgcfgrestore to restore a volume group after I accidentally deleted it. According to the man pages the correct syntax for the vgcfgrestore command (for my computer, vg is the volume group name) is as follows:
vgcfgrestore -f /etc/lvm/archive/vg_00011-464224295.vg vg
However, when I use vgdisplay after it says the volume group has been restored nothing has changed. Looking at the backup file it looks correct but the group has not been changed. Can anyone help me out? This is my first time using LVM and I'm not sure what I'm doing wrong
 
Old 07-29-2013, 05:50 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Quote:
Originally Posted by s1syphus View Post
HAccording to the man pages the correct syntax for the vgcfgrestore command (for my computer, vg is the volume group name) is as follows:
vgcfgrestore -f /etc/lvm/archive/vg_00011-464224295.vg vg
Are you sure the file in /etc/lvm/archive is the most recent? Are there no files in /etc/lvm/backup?

Could you post the contents of the backup/archive file, as well as the output from the vgcfgrestore command?
 
Old 07-29-2013, 07:05 PM   #3
s1syphus
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
The file that I'm trying to backup from isn't the most recent but has the disk configuration I want to restore to. I had a working volume group of 2 disks (with data) then tried adding a 3rd, messed up (different problem that I think I solved) but need to restore the previous configuration in order to retrieve the data from before. The problem is the file I'm specifying shows two physical volumes as well as two logical volumes, which is correct but when I try to restore there's still 3 disks in the volume group. I attached the .vg file and the output for the vgcfgrestore command was:

Restored volume group vg

Running "vgdisplay" gave:

--- Volume group ---
VG Name vg
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 24
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 8.19 TiB
PE Size 4.00 MiB
Total PE 2146188
Alloc PE / Size 0 / 0
Free PE / Size 2146188 / 8.19 TiB
VG UUID Kyuubf-8YdL-uNln-ejA2-SH5J-KROO-yipBWE

Thanks!
Attached Files
File Type: txt vg_00011-464224295.vg.txt (2.3 KB, 14 views)
 
Old 07-29-2013, 07:21 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Quote:
Originally Posted by s1syphus View Post
The problem is the file I'm specifying shows two physical volumes as well as two logical volumes, which is correct but when I try to restore there's still 3 disks in the volume group.
I'm not sure it's possible to remove a physical volume from a volume group by simply restoring an older configuration file. There are probably metadata on all physical volumes in the group that refers to the volume group configuration, and there may even be data on the physical volume in question.

Why can't you use pvremove to get rid of the physical volume?
 
  


Reply



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
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
[SOLVED] HELP! Restoring a LVM Logical Volume Checksumfail Linux - Hardware 1 12-18-2012 07:45 AM
HELP! Restoring a LVM Logical Volume Checksumfail Linux - Server 2 12-18-2012 12:07 AM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
Fedora LVM volume group & Physical Volume resize problem gabeyg Fedora 1 05-14-2008 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 PM.

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