LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 10: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, 12:33 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,805

Rep: Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224Reputation: 2224
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 12:38 PM.
 
2 members found this post helpful.
Old 01-02-2017, 02: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 01:13 PM
LXer: Recover deleted LVM partitions in CentOS/RHEL/Fedora LXer Syndicated Linux News 0 08-15-2013 02:41 PM
How to recover deleted files in linux ramecare Linux - Server 20 07-20-2012 04:20 AM
Recover deleted LVM? your_shadow03 Linux - Newbie 1 02-26-2010 07:43 AM
Can I recover a deleted file in Linux ? josedsilva Linux - General 9 01-05-2010 08:49 AM

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

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