Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-04-2011, 10:36 AM   #1
LQ Newbie
Registered: Jul 2006
Location: Johannesburg, South Africa
Distribution: Suse, Ubuntu, Fedora Core
Posts: 14

Rep: Reputation: 0
can't recover LVM volume: Please specify a *single* volume group to restore

Hi everyone,

I'm trying to recover a deleted LVM volume but can't see to get the
syntax right.

Running the following command gives me a list of backed up LVM volumes:

root@usaxen02:[~]$ vgcfgrestore -l fluidVG_125094317679

------- snip ---------

File: /etc/lvm/archive/
VG name: fluidVG_125094317679
Description: Created *before* executing 'lvremove
Backup Time: Tue Aug 2 17:40:44 2011

File: /etc/lvm/backup/fluidVG_125094317679
VG name: fluidVG_125094317679
Description: Created *after* executing 'lvremove
Backup Time: Tue Aug 2 17:40:44 2011
So I want to recover mars.x.com_root_125152080771 and issue the
following command:

root@usaxen02:[~]$ vgcfgrestore -f fluidVG_125094317679
fluidVG_125094317679: stat failed: No such file or directory
Couldn't read volume group metadata.
Restore failed.

root@usaxen02:[~]$ vgcfgrestore -f fluidVG_125094317679
Please specify a *single* volume group to restore.

root@usaxen02:[~]$ vgcfgrestore -f mars.x.com_root_125152080771
Please specify a *single* volume group to restore.
All different attempts, which apparently should work according to some
google search results I've found but doesn't.

Another attempt:

root@usaxen02:[~]$ vgcfgrestore -vvt
Test mode: Metadata will NOT be updated.
Setting global/locking_type to 1
global/wait_for_locks not found in config: defaulting to 1
File-based locking selected.
Setting global/locking_dir to /var/lock/lvm
Please specify a *single* volume group to restore.
Test mode: Wiping internal cache
Wiping internal VG cache

Does anyone know what the correct syntax should be on CentOS 5.5?
Old 08-04-2011, 03:31 PM   #2
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
vgcfgrestore [-d|--debug] [-f|--file filename] [-l[l]|--list]
[-h|--help] [-M|--Metadatatype1|2] [-t|--test] [-v|--verbose]
'VolumeGroupName' is not in brackets, and is therefore a required parameter.

So the list, "vgcfgrestore -l fluidVG_125094317679" was correct.

The actual restore would be in the format "vgcfgrestore -f <filename> <vg_name>".

The '-f' flag requires a filename, so either of these should work.
vgcfgrestore -f /etc/lvm/archive/ fluidVG_125094317679
vgcfgrestore -f /etc/lvm/backup/fluidVG_125094317679 fluidVG_125094317679
Double check, triple check the content of them to make sure that it is what you want restored. 'vgcfgrestore' is not a fine surgical instrument, it's more of a sledgehammer...

Last edited by tommylovell; 08-04-2011 at 03:38 PM.


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 On
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
How do I resize LVM volume group? rconan Fedora 5 04-22-2009 07:45 PM
Fedora LVM volume group & Physical Volume resize problem gabeyg Fedora 1 05-14-2008 11:26 AM
Missing LV from LVM volume group jalla2000 Linux - Software 1 04-21-2008 05:50 PM
Need to recover data from a LVM volume deyv Linux - General 13 07-25-2005 05:43 PM

All times are GMT -5. The time now is 04:17 AM.

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