LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-02-2017, 09:18 AM   #1
bala.linuxtech
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: RHEL and Centos
Posts: 86

Rep: Reputation: Disabled
Angry how to recover deleted LVM in linux !


Team

Deleted lvm using #lvremove /dev/mapper/vg00-lv01

Could you please help me to restore this deleted lvm.

Thanks +

Regards
Bala
 
Old 01-02-2017, 11:33 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,555

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
It's actually pretty straightforward. You just need to run vgcfgrestore with the archived configuration file. The previous configuration should be the most recent file of /etc/lvm/archive/vg00_*.vg . Those are ASCII text files, and the one you want will have a line
description = "Created *before* executing '/sbin/lvremove /dev/mapper/vg00-lv01'"
You can run
Code:
vgcfgrestore -f /etc/lvm/archive/{file_name} vg00
to restore that configuration.

Last edited by rknichols; 01-02-2017 at 11:38 AM.
 
2 members found this post helpful.
Old 01-02-2017, 01:35 PM   #3
bala.linuxtech
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: RHEL and Centos
Posts: 86

Original Poster
Rep: Reputation: Disabled
Thanks

Restored LV !
 
  


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
Recover files from deleted LVM volume rodrigo.baldasso Linux - Server 4 11-09-2014 12:13 PM
LXer: Recover deleted LVM partitions in CentOS/RHEL/Fedora LXer Syndicated Linux News 0 08-15-2013 01:41 PM
How to recover deleted files in linux ramecare Linux - Server 20 07-20-2012 03:20 AM
Recover deleted LVM? your_shadow03 Linux - Newbie 1 02-26-2010 06:43 AM
Can I recover a deleted file in Linux ? josedsilva Linux - General 9 01-05-2010 07:49 AM

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

All times are GMT -5. The time now is 09:29 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