LinuxQuestions.org
Visit Jeremy's Blog.
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 02-05-2013, 08:38 AM   #1
InvertMe
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Corrupted LVM2


First I will start with the obligatory I am new and suck at Linux comment…

Okay now that we have that out of the way.

I have a test db server that has a LVM2 volume that was filled to capacity and corrupted. It would boot up and try to scan the volume but would hang forever. So I booted with a rescue cd and told the server to fast boot skipping the check. That worked and I was able to get into the server.

I ran a e2fsck –c /dev… and it ran for like 3 days (I was told by a Linux friend to let it run as long as it took) but after it was done I could no longer boot the server.

I booted back into the rescue cd and made a cifs mount to my windows box and copied the data off the lvm2 volume to my local hard drive.

I am told that I can now format the volume, add capacity and copy the data back. Then I should be all set. Is that true? Is there any other way to recover the volume as is? Without blowing anything away?

Thank you very much!

Last edited by InvertMe; 02-05-2013 at 08:40 AM.
 
Old 02-05-2013, 07:29 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,814
Blog Entries: 54

Rep: Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990Reputation: 2990
Quote:
Originally Posted by InvertMe View Post
First I will start with the obligatory I am new and suck at Linux comment…
Welcome to LQ.


Quote:
Originally Posted by InvertMe View Post
Is there any other way to recover the volume as is? Without blowing anything away?
Running fsck on a severely mutilated file system may result in a large portion of its contents being written to /lost+found by their inode number. If you run a Linux distribution with a package management that stores hashes of the contents of packages or have a backup you can check contents against then you could go that route but it requires effort (you have to know a bit about the shell and default tools), there's no guarantee (fsck dumping incomplete files), it's inefficient (if you have a backup then why not restore it?) and it's time consuming.


Quote:
Originally Posted by InvertMe View Post
I am told that I can now format the volume, add capacity and copy the data back. Then I should be all set. Is that true?
No because you'll want to implement a backup strategy and resource monitoring before doing that, otherwise: yes.
 
Old 02-06-2013, 08:00 AM   #3
InvertMe
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
We sadly don't have a back up, I am new to this company so I had nothing to do with this build/backup strategy. I think their thought process was "it's test, we don't need to back it up". I spend a week trying to get the server back in shape and have given up. I built a new server on our vm cluster and that is backed up. I had to buy more disks, ram, and an extra blade but in the end it's worth it to not have this happen again.

I'm sure I will have TONS of questions as time goes on though. I am sure I will frequent this site a lot.
 
Old 02-07-2013, 08:44 AM   #4
Chris E
LQ Newbie
 
Registered: Jun 2008
Location: Berkshire, UK.
Distribution: CentOS
Posts: 21

Rep: Reputation: 1
The key thing is how was it corrupted. A full filesystem shouldnt become corrupted, it might make things hang but usually you are ok for a little bit as 5% of the space is reserved for root by default.

Was it corruption of the block device/raid array, physical volume, volume group, logical volume or the filesystem itself?

If it wasn't the filesystem and you just format it, that corruption could still be there and come back to haunt you later on.
 
  


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
Ubuntu 9.x install corrupted NTFS partition; repair corrupted TrueCrypt partition halfer Linux - General 1 06-30-2009 03:59 PM
lvm2 sarhang Linux - Newbie 1 01-30-2008 06:23 PM
Lvm2 fakie_flip Linux - Software 3 08-07-2006 09:05 AM
Using LVM2 chandru.in Linux - Hardware 0 08-30-2005 08:33 AM
Lvm2 pritambhavsar Programming 1 03-03-2005 08:22 PM


All times are GMT -5. The time now is 11:40 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration