Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/fluidVG_125094317679_00126-1479850541.vg VG name:
fluidVG_125094317679 Description: Created before executing 'lvremove /dev/fluidVG_125094317679/mars.x.com_root_125152080771' Backup Time: Tue Aug 2 17:40:44 2011

File: /etc/lvm/backup/fluidVG_125094317679 VG name:
fluidVG_125094317679 Description: Created after executing 'lvremove /dev/fluidVG_125094317679/mars.x.com_root_125152080771' 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 mars.x.com_root_125152080771 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 /etc/lvm/archive/fluidVG_125094317679_00126-1479850541.vg fluidVG_125094317679 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?

share|improve this question

1 Answer 1

Looking at the manpage, it seems that you need to do something like

vgcfgrestore -f /etc/lvm/archive/fluidVG_125094317679_00126-1479850541.vg fluidVG_125094317679

So you are restoring a volume group named fluidVG_125094317679 using the information from the file from before it was deleted. Without -f, it uses the most recent file (which according to your list output was after it was deleted), with -f, you still have to specify the vg name.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.9.2.1810\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscri"], "copyright__copyright__copyright": ["o you are restoring a volume group named fluidVG_125094317679 using the information from the file from before it was deleted. Without -f, it uses the most recent file (which according to your list output was after it was deleted), with -f, you still have to specify the vg name.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}