LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-03-2007, 10:36 PM   #1
vaaccess
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Rep: Reputation: 0
HD Failure and LVM, how much can I recover?


When setting up Fedora Core 6, I mistakenly decided to continue to use this extra 30GB drive I had.

Well, the system randomly shutdown a couple of times and then I was getting the SMART error for the drive at bootup. This is my dev/hdb drive.

My hda drive has a boot partition (hda1) and a second partition (hda2) that was dedicated to the LVM Volume.

So, I went out and bought a new Seagate drive today and partitioned it as hdc1 (bootable and ultimately to replace my primary drive as well since it is getting old, too) and a second very large hdc2 partition. I then ran the commands to add it to the LVM volume. Up until this point everything was going fine.

I then used the LVM gui to try and move the data off of hdb1 and the system suddenly froze and ultimately had to be rebooted.

Now when I boot up I'm getting the following at the LVM initialization phase:
"...error creating dirty log..."
"...reload ioctl failed: Invalid Argument..."
Then a message saying that two logical volumes in "VolGroup00" active.
"...hash received Sigsegv Backtrace..."
Then some HEX codes
Then, "Kernel Panic - not syncing: Attempted to kill init"

So....My question is...Is my installation toast and should I just pull out the two old drive, leave the new Seagate 300GB in there and start from scratch? I'm just not sure how much I can get from the drives as it is.

Thanks.

Last edited by vaaccess; 01-03-2007 at 10:37 PM.
 
Old 01-09-2007, 01:53 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
I gather you did no LVM snapshots? Pity...

I am no expert here, but you might want to install on your new HD with both old ones disconnected. When you have a running system you might reconnect and try to rebuild step by step, starting with fdisk and the LVM tools. Good luck...
 
Old 01-09-2007, 06:12 AM   #3
vaaccess
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Actually, I was able to get my system back up, though my hdb drive is nearly dead I can't figure out how to proceed. Please see this post:

http://www.linuxquestions.org/questi...02#post2576202
 
Old 01-09-2007, 08:05 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
Well, you have enough space to make clones of /dev/hda and /dev/hdb on your /dev/hdc with "dd". So whatever happens, you would have lost nothing.

I'd suggest you do an
Code:
dd if=/dev/hda of=~/hda-in-a-file
dd if=/dev/hdb of=~/hdb-in-a-file
Though make sure your home / root directory is large enough. Then you can reload the contents back without extraneous material from a /dev/hdc partition (in contrast to a file on hdc) by just reloading the entire files and nothing else (else you'd need to use exactly the same parameters with dd).

If money is of no or little concern, get new hda / hdb.

Alternatively you might use a live CD to clone your dying drive to your present hdc and then switch the drives on the bus.

Last edited by JZL240I-U; 01-09-2007 at 08:10 AM.
 
Old 01-09-2007, 11:29 AM   #5
vaaccess
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Original Poster
Rep: Reputation: 0
What would be the process to clone everything to hdc using a Live CD? That to me seems like the way to go...
 
Old 01-10-2007, 01:44 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
Well, you'd boot from the live CD.
Details depend on the actual partitioning of hdc.

<edit> See post below. What do you want to do exactly? </edit>

Open a console and

Code:
mkdir /storage  
mount -t auto -o,remount,rw /dev/hdc1 /storage
{please look for the correct syntax in man mount}
dd if=/dev/hdb of=/storage/hdb-in-a-file
That should be it. As long as you don't touch (the data) on hda and hdb nothing untoward can happen.

Last edited by JZL240I-U; 01-10-2007 at 06:32 AM. Reason: changed sequence of commands
 
Old 01-10-2007, 02:06 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
Attention please, the above post is incomplete.

If you want to interchange hdb and hdc you must first create a partition (slightly) greater than 30 GB (e.g. 32 GB). For simplicity I assume here, that you have just one partition on hdb.

Then you create more partitions to your liking on hdc to store images in files there. Note down the geometry very very consciously what you do, just in case (you might want to re-create it with fdisk later). Make a backup of the MBR
Code:
dd if=/dev/hdc of=/some/place/on/hdc2-or-higher/MBR.backup bs=512 count=1
Now do the cloning
Code:
d if=/dev/hdb of=/dev/hdc
Switch the drives and reboot.

If everything looks normal you can reclaim the rest of hdc with fdisk, thereby obliterating your earlier backups. Do them again to be on the secure side .

That should be it, but no warranty given.
 
Old 01-10-2007, 06:26 AM   #8
vaaccess
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by JZL240I-U
Well, you'd boot from the live CD.
Details depend on the actual partitioning of hdc.

<edit> See post below. What do you want to do exactly? </edit>

Open a console and
Code:
mount -t auto -o,remount,rw /dev/hdc1 /storage
{please look for the correct syntax in man mount}
mkdir /storage
dd if=/dev/hdb of=/storage/hdb-in-a-file
That should be it. As long as you don't touch (the data) on hda and hdb nothing untoward can happen.
Well, replacing hdb (which only has one partition) is the critical issue. Ideally I'd like to replace both hda and hdb with hdc. However, so far I haven't found a way to do it...So, replacing hdb with hdc is sufficient at this point. I guess I'll see what happens after following yours and the other instructions.

Thanks.
 
Old 01-10-2007, 06:37 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
Again attention: I changed the sequence of commands in post #6.

Okay, then try it as suggested in #7. When all is well you should be able to create a partition behind [ex-hdb on hdc] and move the physical volume from hda there.

Last you could again exchange ex-hdc into the first master position and install GRUB in the MBR.

Please keep us notified how your project advances .

Last edited by JZL240I-U; 01-10-2007 at 06:38 AM.
 
Old 01-11-2007, 08:38 PM   #10
vaaccess
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Original Poster
Rep: Reputation: 0
dd won't read /dev/hdb

So...Screw it. Taking out the two old drives, putting in the new drive alone and will rebuild from scratch.
 
Old 01-12-2007, 01:12 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,444

Rep: Reputation: Disabled
Huh? What was the error message here? You might also have a look at the man pages whether "dd" has a verbose switch ("-v") to get more information -- or use "hdparm" to disable DMA to slow down the data transfer...
 
  


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
Assistance using fsck to recover ext3 LVM partition fiberfarm Fedora 1 11-01-2006 08:49 PM
LVM Disk Failure R4z0r Linux - Software 3 09-19-2006 02:32 PM
How to recover LVM asheesh.tyagi Linux - Newbie 1 05-27-2006 09:22 AM
Recover from filesystem failure? ummmmm22 Linux - General 4 05-21-2006 10:26 PM
Need to recover data from a LVM volume deyv Linux - General 13 07-25-2005 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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