Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-08-2012
Registered User
 
Join Date: Mar 2011
Posts: 34
Thanks: 1
Thanked 0 Times in 0 Posts
Question recover logical volume , how to?

i want to recover my logical volume not the entire volume group.
is that possible?

vgcfgrestore will restore my all volume group , i don't want this solution
Sponsored Links
    #2  
Old 07-08-2012
Registered User
 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
prpkrk,

I don't have exactly the information you want, but I think I know how to get the results you want. Here are my notes. I have done this exactly ONCE, so YMMV. See if it helps.

**********************

Your sandg is still there, sort of, and the data has not been over-written. It was located on /dev/sdb, which now shows up as completely unused, which is a good thing.

Go to /etc/lvm/backup/sandg. There you will see a fully intact backup of the metadata for sandg. You can use the command vgcfgrestore to restore this metadata. Check the manpage, but I think the command would be:

# vgcfgrestore –f /etc/lvm/backup/sandg

Run it in test mode first with the –t switch.

After sandg has re-appeared, you should be able to see the Logical Volume named ‘apps_apache_2.2.17’, size 2 GB. The formatting should already be there – don’t format it. Just mount it and look it over.

If this doesn’t work, you can rebuild the Volume Group from the bottom up, by re-creating the Physical Volume. There was only one PE used, so it should be easy. Just extract the proper UUID ffrom the backup or the archive and run:

# pvcreate –uuid <uuid string>

This should replace the metadata ONLY, by over-writing it, leaving the data area of the physical volume intact. Then create the volume group ‘sandg’, add the PV to it, create a Logical Volume with exactly the old name (again drawn from the archive), and everything should line up. You should not need to format it. The fformatting should simply re-appear, as will the data.
Sponsored Links
    #3  
Old 07-08-2012
methyl methyl is offline Forum Staff  
Moderator
 
Join Date: Mar 2008
Posts: 6,388
Thanks: 286
Thanked 668 Times in 640 Posts
It this a continuation of the problem in you previous thread?
http://www.unix.com/unix-dummies-que...-then-yes.html

1) Please post what Operating System and version you have.
2) Can you post the commands you typed to reduce the Filesystem or Logical Volume (or both? It's not at all clear what happened)?
3) Please make it clear whether this is a system partition or a data partition?
4) Do you have a good backup of the contents of the Filesystem concerned?

From you other thread:
Quote:
still with fsck , first i have to say no , then i have to say yes, millions of time ,
once i reduce filesystem without unmounted it
that cause error on that logical volume
This does suggest that the filesystem had file extents above the new tidemark. The filesystem is probably toast, but let's see the answers to the above questions first.

Foootnote. vgcfgrestore is probably irrelevent.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition kashifsd17 UNIX for Dummies Questions & Answers 6 07-06-2012 04:19 PM
Logical volume name conflict in two volume group dantares AIX 10 12-07-2009 12:12 PM
How to recover deleted logical volume. webster5u Solaris 4 04-17-2009 11:55 AM
Basic Filesystem / Physical Volume / Logical Volume Check chipahoys AIX 1 12-02-2008 07:05 AM
Moving a Logical Volume from one Volume Group to Another krisw AIX 2 07-14-2008 07:48 AM



All times are GMT -4. The time now is 07:51 PM.